Page 1 of 1

Highest since a specific time; iBarShift

Posted: Tue Mar 17, 2015 4:18 pm
by kreisel
Hello!

I want to get the Highest value since 12:30 of the day. In MQL it´s no problem to calculate the specific time and then using "BarShift" and "iHighest" to get the specific Bar.
But if I want to translate this to Delphi I get an error concerning iBarShift: "[Error] Strategie.dpr(268): Not enough actual parameters":

var
TimeHigh: TdateTime;
shift1: Integer;
iHi1: Integer;
xHigh1: Double;

TimeHigh:= iTime(Symbol,1440,0) + 12*60*60 + 30*60;
shift1 := iBarShift(Symbol,15,TimeHigh);
iHi1 := iHighest(Symbol,15,MODE_HIGH,shift1,0);
xHigh1 := iHigh(Symbol,15,iHi1);

Please, anybody can help me?
Thanks!

Re: Highest since a specific time; iBarShift

Posted: Wed Mar 18, 2015 2:26 am
by Stonev
Hi,
try this:
iBarShift(Symbol,15,TimeHigh,false);