I have different AR ( a big difference) if I change the BarPeriod.
If I change the BarPeriod=60 and I put BarPeriod=1 is very very different....I don't understand it because I enter the trade to the same hour.
Why is the difference? And if the reason is the bar ....how I can select the current price to an specifi hour regardless of Barperiod?
My code:
function horas(int timezone,int inicio, int final){
if(lhour(timezone) == inicio && minute(timezone)==0) { enterShort(); }
if(lhour(timezone) == final && minute(timezone)==0){ exitShort(); }
}
function run() {
set(PLOTNOW+PARAMETERS+TICKS);
StartDate = 2010;
EndDate = 2018;
BarPeriod = 60;
}
Thanks in advance