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

RE: [amibroker] Indicator name in chart title.



PureBytes Links

Trading Reference Links

Hi Keith,

I believe that it should automatically happen.  Which indicator are you
refering to?  Is it a custom indicator?


That is an option of the Plot command.  For example in the code below for a
simple moving average:

_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( MA( P, Periods ), "\n     "+_DEFAULT_NAME(), ParamColor( "Color",
colorCycle ), ParamStyle("Style") ); 
_SECTION_END();


This Plot statement plots the MA (Moving Average) of P (which could be
Close, Open, High, Low) and of Periods length. 
Immediately after that we have [ "\n   " ] (using brackets to point out
section of code) this is code to put our indicator name and value on a new
line.  The part of the code that plots the name is right after [
+_DEFAULT_NAME(), ] 
What is the name of this indicator - you find that in the Section_Begin, in
this case it is MA - short for Moving Average

If you were to add multiple Moving Average Indicators each one after the
first would be MA1 then MA2 etc.

If you created your own indicator your plot statement might look like this:
Plot( My_Ind(Close,14), " My Indicator ", ColorBlue, StyleLine);

The help file is very well written but I do understand that it takes time to
absorb all this information.  Trust me, if you keep at it, some day soon it
will all start to make sense.

By the way you can check out the code behind each pane on your sheets by
right clicking and selecting Edit Formula.  That way you can start to see
how AFL code is written for all of the indicators.

Regards,

Dave

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Keith Osborne
Sent: Monday, June 12, 2006 5:31 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Indicator name in chart title.

Hi, is there anyway to include the name of my indicator into the chart
title?

TIA.....Keith


------------------------ Yahoo! Groups Sponsor --------------------~-->
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to SUPPORT {at}
amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links