Forum

Trendline switching in row

void ProcessTrendlineAlert() { ushort u_sep = StringGetCharacter (";", 0 ); string strTrendlineArray[]; int iTrendlineTotal= StringSplit (strTrendLineName,u_sep,strTrendlineArray); int i= 0 ; string strCurrentTrendline=""; if (iTrendlineTotal<= 0 ) return ; for (i= 0

MT5 bug ?

I compare current, previous Bar heights, high, low, open, close. The result is always negative, despite the candle direction. Have tried int, char data types. Is it MT5 bug ? Why negative symbol appears in both directions

Switching code / trigger code

I do not post the full code, to make question very easy to understand. Two cycles should go in order: A-B-A-B... In others words: Cycle A should be activated only once, Then goes cycle B, and everything repeats... It is not working. Logic code below: y= 0 if x =0 then x= 1 (do A...) ================