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

Re: [EquisMetaStock Group] Parabolic SAR



PureBytes Links

Trading Reference Links

Daniel

 

There is a way to plot SAR() with different colors for up and down. This method is really only workable with a dotted line style - and not with a solid line style. A dotted line only plots on each bar and does not connect between bars. That allows the transition from "zero to active" or "active to zero" to remain hidden. A solid line cannot hide that transition.

 

The following formula generates two SAR outputs. The first output plots the SAR when it is less than CLOSE, otherwise it plots zero. The second output plots the SAR when it is greater than CLOSE, otherwise it plots zero. Each plot can be given the color and style of your choice. Remember that a dotted line works best because of the "transition" problem with a solid line.

 

If no other outputs were included in the formula then scaling the indicator to price would allow the zero segments of each plot to severely distort or compress the price bars. This problem is overcome by adding an N/A output as the LAST output from the indicator. I've used ValueWhen(1,0=1,0) to create this output. This output can never be valid because 0 (zero) is never equal to 1 (one), and I'm using "0=1" is the (non-existent) trigger expression. The indicator still remains "scaled" to the price chart but the unwanted zero dots are allowed to "float" and disappear from the viewing window. Once the indicator has been floated price bars can again use the full height of the inner window.

 

In the event that the zero dots reappear at the bottom of the window on some charts, and this can happen, an extra valid zero line can be created. Giving this zero line a heavy dotted style and the same color as the chart background will effectively blank out any zero SAR plots that might come into view.

 

Obviously this indicator cannot plot as required when first dropped onto a chart - it requires each plot be given the correct style and color. If you wanted to use this on every chart then you should set up the indicator and then save it as part of your default template. That way the two-color SAR will plot correctly as soon as you open each chart.

 

{Two-Color SAR}

A:=Input("Step value", 0.001,1,0.02);

B:=Input("Maximum value",0.01,1,0.2);

R:=SAR(A,B);

If(R<C,R,0);

If(R>C,R,0);

{0;}

ValueWhen(1,0=1,0);

 

Hope this helps. Please let me know if you have any problems making this work.

 

 

Regards

 

Roy

www.metastocktips.co.nz





  ----- Original Message ----- 
  From: danielteokh 
  To: equismetastock@xxxxxxxxxxxxxxx 
  Sent: Tuesday, October 30, 2007 1:10 PM
  Subject: [EquisMetaStock Group] Parabolic SAR


  Hi,

  How can i plot PARABOLIC SAR and make it more colorful, showing 
  different color for up and down ?

  Thanks.



   

  __________ NOD32 2627 (20071030) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

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

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

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

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