Alligator indicator not showing data

 

Hello there,

I started playing with the Alligator indicator and after finding the optimum settings for my exit, i suddenly realised that despite showing on the graph, the Alligator's lips were not giving me any data to my EA.

Here is the code and settings:

alLip_1 = iAlligator(NULL, 0,13, 8, 8, -1, 5, -3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORLIPS, 1);
alLip_2 = iAlligator(NULL, 0,13, 8, 8, -1, 5, -3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORLIPS, 2);

As you may notice, the Teeth is shifted -1 bar and the Lips is shifted -3.

While i can get data for the Teeth, i can't get any data whatsoever for the Lips. It gives me 0. But if i hover the mouse over the Lips plotted on the chart, i can see a value. My first thought was that perhaps a 5 smoothed moving average would not be possible shifted back -3 bars. To test this theory i added a standard smoothed MA of 5 periods, shifted by -3 to the EA and it also failed to give me a value. 

Has anyone face this sort of issue before? How is it possible that MT4 will plot the SMMA or the Lips, display a value when i hover the mouse over it, but not allow me to read this value on a EA?

Many thanks,

Daniel

 
bentbawer:


Hello there,

I started playing with the Alligator indicator and after finding the optimum settings for my exit, i suddenly realised that despite showing on the graph, the Alligator's lips were not giving me any data to my EA.

Here is the code and settings:

As you may notice, the Teeth is shifted -1 bar and the Lips is shifted -3.

While i can get data for the Teeth, i can't get any data whatsoever for the Lips. It gives me 0. But if i hover the mouse over the Lips plotted on the chart, i can see a value. My first thought was that perhaps a 5 smoothed moving average would not be possible shifted back -3 bars. To test this theory i added a standard smoothed MA of 5 periods, shifted by -3 to the EA and it also failed to give me a value. 

You have a shift to bar 3 . . .  so how can you expect to have a value for bars 1 and 2 ?  either change your shift or get values for bars 3 and greater  . . . if you plot this setup on a chart using the Alligator indicator you will see the problem.
 

Thanks for your reply Raptor.

As i said in my original message, MT4 allows me to plot an Alligator indicator with these settings and displays a value for the Lips when i hover my mouse over it, so not sure why i can't "capture" this value using the EA. 

 
bentbawer:

Thanks for your reply Raptor.

As i said in my original message, MT4 allows me to plot an Alligator indicator with these settings and displays a value for the Lips when i hover my mouse over it, so not sure why i can't "capture" this value using the EA. 

No,  it doesn't . . . post screen grabs with your mouse over bars 1 and 2 showing the values in the Data Window.
 
I see what you mean now. Thanks for pointing that out.
Reason: