I am trying to create a simple indicator which allows you to overlay the 4Hr or any other time frame moving average over your primary Bars on a chart.
I have tried doing it in the strategy but I could not create a new Plot and I also tried creating an indicator to calculate this but I can not add 240 minute bars for the close value.
Is there anyway to do this? Can I plot directly from the strategy?
I also tried to Add(SMA(BarsArray[5],period) in initiailize() and OnStartup(), where this array is 240 min, where should this go?
Comment