MQL4 - automated forex trading   /  

Forum

Point Pivot Indicator Bug

Back to topics list To post a new topic, please log in or register

avatar
54
fftremblay 2011.04.20 14:49 
test
Graphic Expert Advisor: AutoGraf

Graphic Expert Advisor: AutoGraf

The article shows the workability of graphics in creation of a convenient interface to manage trading.


avatar
4328
WHRoeder 2011.04.20 18:03 
Of course it does. If the if is false dPivotPoint doesn't get set and the line goes to zero.
if(Time[iCount])%14400 == 0) // New 4 hour bar
   tPivotPoint[iCount]   = ( High[iHighest(Symbol(), 0, MODE_HIGH, 4, iCount)] 
                           +  Low[ iLowest(Symbol(), 0, MODE_HIGH, 4, iCount)] 
                           + Close[iCount]) / 3;
else tPivotPoint[iCount] = tPivotPoint[iCount+1];

Note the iHighest assumes you are on a H1 chart.
Back to topics list  

To add comments, please log in or register