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

Re: [amibroker] layer number for PlotShapes


  • Date: Thu, 10 Dec 2009 21:56:02 -0800
  • From: Eski Movsinuit <eskimovsinuit@xxxxxxxxx>
  • Subject: Re: [amibroker] layer number for PlotShapes

PureBytes Links

Trading Reference Links



Hi Patrick,
Thank you very much. You helped me resolve the issue.
One minor comment: you said:
"Layers 1 thru 5 are already defined by AB as Default, Intraday, Daily, Weekly, and Monthly."
Shouldn't it be this:
"Layers 0 thru 4 are already defined by AB as Default, Intraday, Daily, Weekly, and Monthly"?

 
Eski




-----Original Message-----
From: ta4charts@xxxxxxxxxxx
Sent: Thu, 10 Dec 2009 17:37:58 -0800
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] layer number for PlotShapes

 

Hi eskimo,
 
IMHO, Layers is one of the most useful (and perhaps unique to stock charting) features of AB's charts.  However one thing isn't intuitively clear -- the numbering of them.
 
First, in your PlotShapes argument, there is a provision for specifying a layer (0 or Default Layer is the default).  The PlotShapes arguments are: PlotShapes(shape, color, layer, yposition, offset).  Now the trick is to know what layer number you assigned your signals to -- Layers 1 thru 5 are already defined by AB as Default, Intraday, Daily, Weekly, and Monthly.  So as you specified 2 in your PlotShapes code, it would only show up on Intraday charts (unless you have deleted the stock layers) or when that layer is active.  NOTE: It's not the name you give the layer, but it's number (like watchlists). Try figuring out the actual number of the watchlist you named 2 (I have mine both numbered and named, in my instance 21 - Arrow Signals). Actually I have other layers for long and short (i.e., Trade Entry), and sell and cover (Trade Exit) for some charts as well; but for testing code, all Arrow Signals works for me usually.  Now verify the number, put that number in your plotshapes code, check the box next to that layer and your signals should appear.
 
Go wild with layers -- you can put an amazing amount of info on your charts: Text (for Trade notes, commentary, events, news, earnings dates, dividend dates, etc.),  Lines ( for Trade entries, Trends, S&R, fibs, etc) (and sorted by different timeframes) and more and still not clutter up your chart because layers allows you to hide or expose as you wish.  Of course, you have to use parameters to hid/expose things like MAs, or other afl drawn items, but not a big deal (tho it would be nice to expose or hide all MAs at a click). 
 
Have fun.
 
Peace and Justice   ---   Patrick
----- Original Message -----
Sent: Thursday, December 10, 2009 4:03 PM
Subject: [amibroker] layer number for PlotShapes

Hi,

I have the following code to plot UP/DOWN arrows for BUY/SELL. My question is how do I assign a layer number so that the arrows only show up when layer number 2 is selected?

I created a layer called "2" and it does not work.

Buy=Cross(MACD(), Signal());
Sell=Cross(Signal(), MACD());
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
Plot( Close, "Price", colorBlack, styleCandle );
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 2, IIf( Buy, Low, High ) );



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

**** 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@yahoogroups.com
    amibroker-fullfeatured@xxxxxxxxxxxxcom

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

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


__._,_.___


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





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___