Hi People
Can anyone have a look at this indicator code, it shows the daily WAIST level.
If i code it with this setup the waist is correct
double OPEN = iOpen(NULL,1440,1);
double CLOSE = iClose(NULL,1440,1);
double WAIST = (OPEN + CLOSE)/2;
If i code it this way it reads 5 to 10 pips out depending on the previous days range.
if(Open[i+1] > YesterdayOpen)
YesterdayOpen = Open[i+1];
//----
if(Close[i+1] < YesterdayClose)
YesterdayClose=Close[i+1];
if (TimeDay(Time[i])!= TimeDay(Time[i+1]))
{
WBuffer[i+1] = EMPTY_VALUE;
WAIST = ( YesterdayOpen + Close[i+1] ) / 2;
I can not see where the problem is - it is probably something real obvious but i just can not see it at present, any help would be greatly appreciated.
Now i need to do it the 2nd way so that i can have it showing up on the previous days as a trading history.
Here is the code
Daily_Waist.mq4
cja