I developed a scalping trading system, and used fixed tick intervals.
Now I am trying to upgrade for a variable interval using ATR as reference.
I am 100% blind on this.
I´ve never used indicators before and don´t now how to do it. After some reading and search, my best try was:
Thanks in advance.
nt ATR;
void OnInit() {
ATR = iATR(_Symbol,PERIOD_M5,10);
}
void CheckATR() {
ArraySetAsSeries(_atr, true);
if( CopyBuffer(ATR,0,0,10,_atr) < 0) {Print("CopyBufferATR error =",GetLastError());}
Print("the ATR is",_atr);
}