[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] how to plot a array by using for and function



PureBytes Links

Trading Reference Links

// 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 !



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/