int OnCalculate (const int rates_total,
const int prev_calculated,
const datetime& time[],
const double& open[],
const double& high[],
const double& low[],
const double& close[],
const long& tick_volume[],
const long& volume[],
const int& spread[])
{
int limit = rates_total - prev_calculated;
//--- counting from 0 to rates_total
ArraySetAsSeries(Buffer1, true);
ArraySetAsSeries(Buffer2, true);
ArraySetAsSeries(Buffer3, true);
//--- initial zero
if(prev_calculated < 1)
{
ArrayInitialize(Buffer1, 0);
ArrayInitialize(Buffer2, 0);
ArrayInitialize(Buffer3, 0);
}
How i translate the integer const to Delphi. this are not in the strategy buiolder
-
- Posts: 5
- Joined: Fri Jul 01, 2016 5:56 pm
-
- Posts: 1479
- Joined: Mon Apr 01, 2013 3:55 am
Re: How i translate the integer const to Delphi. this are not in the strategy buiolder
Hello
You don't need to write all these constants while creating the indicators in Forex Tester.
You just need to use the function Calculate.
procedure Calculate(index: integer); stdcall;
begin
// Here you should calculate values of
// index buffers for bar defined with "index"
...
end;
You can find more info in the Help -> Indicators API menu in the Forex tester program.
You don't need to write all these constants while creating the indicators in Forex Tester.
You just need to use the function Calculate.
procedure Calculate(index: integer); stdcall;
begin
// Here you should calculate values of
// index buffers for bar defined with "index"
...
end;
You can find more info in the Help -> Indicators API menu in the Forex tester program.
Return to “Programming lessons”
Who is online
Users browsing this forum: No registered users and 5 guests