Forum

how do I usde MA whith rsi as the aplied price and refer to past events?

Hi I am pretty new to coding. I am trying to take the moving average of the RSI. I tried it tis way: double r = iRSI(NULL,0,rsiPeriod,0,0); double fastMA1 = iMA(NULL,0,lengthrsifast,0,MODE_SMA,r,0); double slowMA1 = iMA(NULL,0,lenghtrsislow,0,MODE_SMA,r,0); but it is not working returns 0.0. and

How do I check if a condition was met in the candles before?

Hi I am really new to coding, and I am trying to code an alert system for a strategy. double fastMA1 = iMA(NULL,0,lengthrsifast,0,MODE_SMA,r,0); double slowMA1 = iMA(NULL,0,lenghtrsislow,0,MODE_SMA,r,0); bool staticlong = fastMA1 < staticlonglvl; bool ststicshort = fastMA1 < staticshortlvl; so what