Quote:
|
Originally Posted by pipeline
Now, in general, to work on Close price, you test for the Opening of a new bar and then write your conditions on arrays' index 1. A possible code to detect the Opening of a new bar:
bool NewBar()
{
static datetime dt = 0;
if (Time[0] != dt)
{
dt = Time[0];
return(true);
}
return(false);
}
Hope this helps, good luck.
|
it almost helps if you know what I mean..assuming it returns true then what, how do you get the value of the indicator out of the array at the current close now that it's been detected that there is a new bar?