Need help to troubleshoot my EA - page 2

 
Catalin Zachiu:

Thanks Catalin, the EA you sent is awesome, the only issue is I want the EA to open as many order as possible if the requirements are met. Meaning, every time RSI is overbought, it has to sell even if there is still an open sell trade going on. Also I want the EA to do hedging trade as well. Meaning, if a buy position is open and meanwhile the RSI is overbought, it should be able to open the sell position while having the buy order.

Can you please do me a favor and revise the EA as per these conditions?

 
Dirceu Francisco De Nadal:
2019.02.05 12:11:37.005 Not enough memory for 251150 bars for indicator Moving Average (AUDCAD,M1)
I have this message at Journal on MT4 EA at varous symbols. Anybody would help me on that?

ram or hard disk memory , try to reduce the setting in options of mt4 , at charts setting , reduce it to10000 bars or upgrade your ram or hdd

 

@ Catalin Zachiu

Catalin, I managed to figure out the issue with my EA. I changed the RSI definition to read the first and second bar instead of Current bar and first bar:

//    Older version:

    RSICurrent=iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,0);
    RSIPrevious=iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,1);


//    Revised version:

    RSICurrent=iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,1);
    RSIPrevious=iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,2);

Anyway, thanks for your kind help. Wish you success.

Reason: