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

[amibroker] Re: witing value on chart


  • Date: Mon, 23 Nov 2009 06:39:14 -0000
  • From: "wooziwog" <xcitemint@xxxxxxx>
  • Subject: [amibroker] Re: witing value on chart

PureBytes Links

Trading Reference Links

Two functions can be used to accomplish this, GFXDrawText or PlotText.  The following example appears under PlotText in the AFL Functions Reference:
Plot(C,"Price", colorBlack, styleLine ); 
Plot(MA(C,20),"MA20", colorRed ); 

Buy=Cross( C, MA(C,20 ) ); 
Sell= Cross( MA( C, 20 ), C ); 

dist = 1.5*ATR(10); 

for( i = 0; i < BarCount; i++ ) 
{ 
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen ); 
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed, colorYellow ); 
} 

PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorGreen, colorRed ) ); 

Copy and Paste it - with slight modification it should serve your purpose.

David K.

--- In amibroker@xxxxxxxxxxxxxxx, Deepak Patade <iamdeepakpatade@xxx> wrote:
>
> how can i write the value on chart for a signal generated.
> i want it at the spot where there is a arrow on the chart and not at the
> left top corner.
> So whever a buy/sell is generated it writes the value at that point
> Tried writeval, but it writes at the corner
>




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

**** 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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/