My idea is for defining a zone of multiple touch of price with horizontal levels without breaking it , in other word a range
My idea to code this is , declare double variables for Hi1 , Hi2 , Hi3 , Hi4 , all assigned to 0
and the same for Lo1 to Lo4 , all = 100000
in OnBarUpdate() , i have made loops , one for the highs , one for the lows , ti looks like this :
// FIND HIGHEST AND LOWEST PRICES OF THE RANGE
for (int i=1;i<12;i++)
{
if ( Low[i] < Lo1 ) Lo1=Low[i];
if (Low[i] < Lo2 && Low[i]>Lo1) Lo2=Low[i];
if (Low[i] < Lo3 && Low[i]>Lo2) Lo3=Low[i];
if (Low[i] < Lo4 && Low[i]>Lo3) Lo4=Low[i];
}
for (int j=1;j<12;j++)
{
if ( High[j] > Hi1 ) Hi1=High[j];
if (High[j] > Hi2 && High[j]<Hi1) Hi2=High[j];
if (High[j] > Hi3 && High[j]<Hi2) Hi3=High[j];
if (High[j] > Hi4 && High[j]<Hi3) Hi4=High[j];
}
i have made print (Hi1 , Hi2 , Lo1 etc ) but all the values have no sens , prices are really far away from what it shows me , except that Hi1>Hi2>Hi3 , any idea ?
thx


Comment