Forum

Struggeling to go back 2 bars.

Hi, First a confession... I am not good at programming :-) I hope that someone can / will help me. I have some code to make Heiken Ashi Candles, now I would like to put a condition for 2 candles back. But I can't seem to get it right. Here is the Code: int OnCalculate ( const int rates_total

Create Custom Moving Avg of other Indicator Values

Hi, I am trying to make an indicator that can basically add a moving avg of other items than Price. So as an example, I would like to create a moving average of Volume. What I have been thinking is to add the iVol data to an array (although I dont know how to do this yet), and then to use iMAOnArray

Beginner Question - Drawing Custom MA Period

Good Day, I am a beginner in coding Indicators. I am trying to add a Daily Moving average line onto a 1 hour chart. so the code I am using is: int limit = rates_total - prev_calculated; ArraySetAsSeries(DailyMA, true); if(prev_calculated < 1) { ArrayInitialize(DailyMA, 0); } else