// Hello is it-possible to plot a array by using for and function ?
// The purpose is to plot my arrray "angle1par1"
// I have found another way like this : angle1par1 = 
IIf(int(BarIndex())>=i1,1*(BarIndex()-i1) + buyPoint,Null);
// But I want to do the same trick with for and function because I don't like 
to think with the arrays .

 
trendline = Study("RE", 1150);
Buy =Cross( Close, Study("RE",1150) );

buyPoint = trendline;
i1 = 0;
angle1par1 =Null;

function gann (buyPoint,i)
{

angle1par1 = 1*(i-i1) + buyPoint;
_TRACE(NumToStr(angle1par1)); // my array is right I have seen it in the 
debugview

return angle1par1 ;

}


for( i = 1; i < BarCount; i++ )
{
   
   
   if(Buy[ i ] == 1) 
   { 
  i1 = i-1 ;
   } 
for (i=i1;i<BarCount;i++)
{
gann (buyPoint,i);
}

} 

Plot(angle1par1,"angle 1x1",colorRed);// horizontal line?! I am waiting for 
line with slope !

Reply via email to