Hi Joao. If you know, in the standard Alligator indicator, three MAs are shifted forward by 3, 5 and 8 candles(bars). They programmed it this way:
void OnInit(void) { IndicatorDigits(Digits); // Setting the line shift when drawing: SetIndexShift(0,InpJawsShift); SetIndexShift(1,InpTeethShift); SetIndexShift(2,InpLipsShift); // Skip the first bars: SetIndexDrawBegin(0,InpJawsShift+InpJawsPeriod); SetIndexDrawBegin(1,InpTeethShift+InpTeethPeriod); SetIndexDrawBegin(2,InpLipsShift+InpLipsPeriod);
Maybe this piece of code will help you.
Hi Joao. If you know, in the standard Alligator indicator, three MAs are shifted forward by 3, 5 and 8 candles(bars). They programmed it this way:
Maybe this piece of code will help you.
Thanks Victor. You are right. Since the index cannot be negative, instead it uses the IndexShift to print the Line in the future. I guess something similar is used also in the " Ichimoku " indicator.
Will test it. Appreciated.
Thanks Victor. You are right. Since the index cannot be negative, instead it uses the IndexShift to print the Line in the future. I guess something similar is used also in the " Ichimoku " indicator.
Will test it. Appreciated.
How can I Print value in shift?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everyone,
Normally when the Buffers are printed, the minimum shift is 0. So you can only see the values from the past till now.
My goal is to print the current value of shift 0 not just now, but till the end of the day.
How can I do that ? It's an easier way to visualize for ex. Support/Resistance etc. My indicator uses an IndexStyle type DRAW_LINE.
Help is appreciated.
Thanks,
Joao