Trying to find a way to limit the amount of bars the EA is looking at for the indicator Ichimoku Kinko Hyo, its looking at a silly amount of bars and erroring as not enough memory.
I have tried going into options and setting the max bars on chart and in history to 5000 but its not working.
Is there a way I can code this into the script to only use the last x amount of bars for the indicator?
2021.05.04 11:29:03.007 Not enough memory for 7994468 bars for indicator Ichimoku Kinko Hyo (USDJPY,M1)
the code is just pulling out the value for the senkou A and B lines;
SenkouA = NormalizeDouble(iIchimoku(Symbol(),PERIOD_CURRENT,9,26,52,MODE_SENKOUSPANA,0),_Digits); //value of senkouspanA at current candle
and same again but for span B