Hi Eski,

Yes you are right (though I did say that their numbering isn't intuitively 
clear <VBG>).  I realized that a few moments after I sent my reply -- like 
watchlists, default colors, and a few other things, AB starts it's numbering at 
0.  

Then again, maybe I'm just a Roman at heart who never discovered zero. (and I 
apologize for calling you an "eskimo")

Glad I could help.

Peace and Justice   ---   Patrick
  ----- Original Message ----- 
  From: Eski Movsinuit 
  To: [email protected] ; [email protected] 
  Sent: Thursday, December 10, 2009 9:56 PM
  Subject: Re: [amibroker] layer number for PlotShapes




  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: [email protected]
    Sent: Thu, 10 Dec 2009 17:37:58 -0800
    To: [email protected]
    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 ----- 
      From: [email protected] 
      To: [email protected] 
      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






  

Reply via email to