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

Re: [EquisMetaStock Group] How to plot indicator only if volume condition is met?



PureBytes Links

Trading Reference Links

Hi Preston,

Thanks.

It is very interesting.

Will study it carefully.

Thanks again.

Penny




--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxxx> wrote:
> Penny,
> 
> Here's the formula:
> 
> {BarBack Z}
> {Will draw a line from one High to the next---back in time}
> {Reference highs are also displayed within the window}
> len:=Input("Periods for Ref High(Set > Barsback)",8,100,20);
> Signal:=Ref(H,-len);
> Barbk:=Input("Barsback High",1,100,8);
> Signal2:=Ref(H,-Barbk);
> LastBar:=Cum(1)=LastValue(Cum(1)-(len));
> bacdis1:=ValueWhen(1,LastBar,LastValue(Signal));
> 1stRefPnt:=Ref(Ref(bacdis1,-Barbk),Barbk);
> {end}
> bacdis2:=ValueWhen(1,LastBar,LastValue(Signal2));
> 2ndRefPnt:=Ref(Ref(bacdis2,-Barbk),Barbk);
> {end}
> {Line Plot }
> D1:=LastValue(Cum(1))-LastValue(LEN);
> {D1 is first high of line}
> D2:=LastValue(Cum(1))-LastValue(BARBK);
> {D2 is last high of line}
> P1:=1stRefPnt; {start-of-line data array}
> P2:=2ndRefPnt; {end-of-line data array}
> V1:=ValueWhen(1,D1,P1);
> V2:=ValueWhen(1,D2,P2);
> B1:=LastValue(Cum(1))-D1;
> B2:=LastValue(Cum(1))-D2;
> LINE:=V1-(BarsSince(Cum(1)=D1)*( (V1-V2)/(B1-B2)));
> LINE;
> 1stRefPnt; 
> 2ndRefPnt;
> 
> 
> What you will need to do is first understand how the indicator 
works. 
> Notice that it plots a trendline and 2 horizontal lines. This 
occurs 
> back in time by a defined period. A lot of the indicator will not 
be 
> needed in your case but understanding how it works should help in 
> being able to write the type of indicator that you want. Also note 
> that when the indicator is not plotting a value of NA will result. 
> Using the Binary or Surrogate option that I mentioned before you 
> would have a plot of some type at all times. Hope this helps.
> 
> Preston
> 
>   
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "pennywat" <pennywat@xxxx> 
> wrote:
> > Hi Preston,
> > 
> > You are absolutely correct I do not want a continuous plot but 
only 
> > during defined periods when certains conditions are satisfied.
> > 
> > I am willing to learn and would be grateful if you can share the 
> way 
> > you wrote your "Barsback Z" indicator.
> > 
> > It will be interesting.
> > 
> > Please attached the indicator and e-mail it to :-
> > 
> > pennywat@xxxx
> > 
> > Thanks.
> > 
> > Penny
> > 
> > 
> > --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxxx> 
> wrote:
> > > Penny,
> > > 
> > > Your easy options are to use binary values of 1 when true else 
0 
> > when 
> > > not or surrogates such as the close, high, low or open when 
your 
> > > condition is not being met.
> > > 
> > > There is one more option which you might be able to use but 
you 
> > would 
> > > really need to consider whether the benefit would be worth the 
> > > effort. Some time ago I wrote an indicator which plotted a 
> > trendline 
> > > with support and resistance levels. The plot was not 
continuous 
> > > meaning it only plotted during the defined periods which I 
> believe 
> > is 
> > > what you are looking for. The indicator was called "Barsback 
Z". 
> > The 
> > > problem with writing such code is that IT IS NOT EASY and most 
> > people 
> > > choose the first two options that I've mentioned because of 
the 
> > ease 
> > > in writing the code.
> > > 
> > > Preston
> > > 
> > >  
> > > 
> > > --- In equismetastock@xxxxxxxxxxxxxxx, penny watson 
> > <pennywat@xxxx> 
> > > wrote:
> > > > Hi Pierre,
> > > > 
> > > > Good idea but now will have to change variable
> > > > according to the number of days being viewed.
> > > > 
> > > > Anymore ideas?
> > > > 
> > > > All ideas are welcome.
> > > > 
> > > > Thanks.
> > > > 
> > > > Penny
> > > > 
> > > > 
> > > > --- Pierre Tremblay <pt2000@xxxx> wrote:
> > > > 
> > > > > Pennywat,
> > > > > 
> > > > > You may try :
> > > > > 
> > > > > If(V>=Mov(V,20,E),HHV(C,3), LLV(L, 250))
> > > > > 
> > > > > 
> > > > > ...if you use 250 periods for display.
> > > > > 
> > > > > Pierre Tremblay
> > > > > 
> > > > > 
> > > > > pennywat a écrit:
> > > > > 
> > > > > >Hi,
> > > > > >
> > > > > >Need help to plot indicator only when volume target
> > > > > is met.
> > > > > >
> > > > > >If(V>=MOV(V,20,E),HHV(C,3),0)
> > > > > >
> > > > > >I have set the indicator style to dots ..........
> > > > > >
> > > > > >If the volume is met it plots a dot it at HHV(C,3)
> > > > > else zero is 
> > > > > >plotted.
> > > > > >
> > > > > >The problem is the chart will always be zero-based
> > > > > and I need to 
> > > > > >zoom in to see the chart clearly.
> > > > > >
> > > > > >Is there another way of writing this formula so it
> > > > > is not zero=based?
> > > > > >
> > > > > >Have tried using expert highlights but cannot plot
> > > > > the dot at HHV
> > > > > >(C,3) when volume is met.
> > > > > >
> > > > > >Is there a way to plot the dot only when volume is
> > > > > met else not to 
> > > > > >plot anything? 
> > > > > >
> > > > > >Any ideas are welcome.
> > > > > >
> > > > > >Thanks.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > 
> > > > > >Yahoo! Groups Links
> > > > > >
> > > > > >
> > > > > >
> > > > > > 
> > > > > >
> > > > > >
> > > > > >
> > > > > >  
> > > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > > 
> > > > 	
> > > > 		
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > New and Improved Yahoo! Mail - 100MB free storage!
> > > > http://promotions.yahoo.com/new_mail




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

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