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

Re: [EquisMetaStock Group] Restricting Plots



PureBytes Links

Trading Reference Links

Hi Kevin


I've found that using a flag that switches from FALSE to TRUE (and stays TRUE through to the last bar) on the bar where the plot is to begin can be used with ValueWhen() works well.

ValueWhen(1,Flag,"Weekly Pivots") for example.

The real trick is how to code the flag. A reverse bar counter works when just a specific number of bars is required. This is done by subtracting the bar count from the last value of the bar count 

{Reverse Bar Count}
LastValue(Cum(1))-Cum(1);

{Mark Last 10 Bars}
Trigger:=1+LastValue(Cum(1))-Cum(1)=10;
Hold:=Cum(Trigger)=1;
Hold;

The same principle can be applied to events as well as bars. If your pivot points were based on my Weekly OHLC formula, the weekly timing signal "J" would be the variable to down count. You would probably want to lock onto the last or second to last signal and use it to enable ValueWhen().

Hope this helps.


Regards

Roy




  ----- Original Message ----- 
  From: Kevin Barry 
  To: equismetastock@xxxxxxxxxxxxxxx 
  Sent: Friday, September 07, 2007 2:24 AM
  Subject: [EquisMetaStock Group] Restricting Plots


  Hello,

  I would like to restrict the plotting of indicators on my charts to the 
  last x number of periods. For example, when plotting weekly pivots on a 
  daily chart, I would like to only plot lines for the current week and not 
  every week back to the beginning of the chart. It would also be nice just 
  to see, say, the end of an MA plot. I am currently using daysofweek but I 
  am sure that it is not the most efficient way of doing it.

  Any suggestions for a more elegant solution?

  Thanks in advance.

  Kevin


   

  __________ NOD32 2510 (20070906) 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/