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

[EquisMetaStock Group] Re: Need help for creating MS indicator



PureBytes Links

Trading Reference Links

Tono,

Try this for the candleline:

{CandlelineRecord Indicator}

Lng:= Abs(ROC(CLOSE,8,$));
Supprt:=(O+C)/2;
Resistnce:=(O+C)/2;

A:=If(Lng <= Abs(O - C) AND
C>O, Supprt,PREV);

B:=If(Lng <= Abs(O - C) AND
C<O, Resistnce,PREV);

A;B;
{end}

The problem that I have is that I don't know what Omega uses for 
volatility(8). This indicator plots very similar but you will need to 
check it out.

Preston




--- In equismetastock@xxxxxxxxxxxxxxx, Har tono <tonmdn@xxx> wrote:
>
> Dear Preston,
> 
> Thanks for your efforts. I have upload two images
> under "Photo" section within album "MS Candlestick
> formula".
> 
> Hope that will help
> 
> Thanks
> 
> Tono
> --- pumrysh <no_reply@xxxxxxxxxxxxxxx> wrote:
> 
> > Tono,
> > 
> > That helps. Thanks for pointing out the excess I
> > didn't notice it.
> > 
> > Attachments don't come across. Up load a copy to the
> > files section.
> > 
> > I'll work on the code and get back.
> > 
> > 
> > Preston
> > 
> > 
> > 
> > 
> > 
> > 
> > --- In equismetastock@xxxxxxxxxxxxxxx, Har tono
> > <tonmdn@> wrote:
> > >
> > > Dear pumrysh,
> > > 
> > > Thanks for ur help.
> > > 1. I agree that Linear regression angle oscillator
> > is
> > > the metastock Linear regression.
> > > 2. I think average price is a smoothed average of 
> > >  the (High-low) for three candles back.
> > > 3. this following codes contains value for Excess
> > :
> > >    Plot3(Excess,"OverB");
> > >    Plot4(-Excess,"OverS");
> > > 
> > > I wonder if you recieve my attached image for
> > results
> > > from the code in Omega Research software. Maybe it
> > > could provide a deep insight to the programming
> > code.
> > > 
> > > Please let me know if you didn't receive the
> > attached
> > > images.
> > > 
> > > Thanks again
> > > 
> > > Tono
> > > 
> > > --- pumrysh <no_reply@xxxxxxxxxxxxxxx> wrote:
> > > 
> > > > Tono,
> > > > 
> > > > We will need to make a couple of decisions
> > inorder
> > > > to translate the 
> > > > code. 
> > > > 
> > > > It appears to be based on a Linear regression
> > angle
> > > > oscillator. The 
> > > > closest match that I can think of is the
> > metastock
> > > > Linear regression 
> > > > slope oscillator. Next problem is their use of
> > > > average price. This 
> > > > could be simply the close but it could also be a
> > > > smoothed average of 
> > > > the close. We do know that the trend days are 5
> > so
> > > > that is not a 
> > > > problem.
> > > > 
> > > > Basically so far we would have:
> > > >  
> > > > LinRegSlope(x,5); 
> > > > 
> > > > The rest of the code evaluates for a new high or
> > low
> > > > based on the 
> > > > oscillator position.
> > > > 
> > > > We are also given a value for excess but I don't
> > see
> > > > it used in the 
> > > > code.
> > > > 
> > > > Maybe if you can supply some more input we can
> > get a
> > > > bit further with 
> > > > the translation.
> > > > 
> > > > Preston
> > > > 
> > > > 
> > > > 
> > > > --- In equismetastock@xxxxxxxxxxxxxxx, Har tono
> > > > <tonmdn@> wrote:
> > > > >
> > > > > Dear all,
> > > > > 
> > > > > Could anyone please help me to translate two
> > > > following
> > > > > programming code to metastock indicator
> > formula so
> > > > we
> > > > > get the indicators as shown in attached image
> > :
> > > > > 
> > > > > New Highs/Lows (Indicator)
> > > > >
> > > >
> > ---------------------------------------------------
> > > > > Input: TrendDays(5), Excess(8);
> > > > > Variables: NewHigh(0), NewHighVal(0),
> > NewLow(0),
> > > > > NewLowVal(0);
> > > > > if H>NewHighVal[1] then begin
> > > > > NewHighVal=H;
> > > > > NewHigh=NewHigh[1]+1;
> > > > > end
> > > > > else begin
> > > > > if LinearRegAngle(AvgPrice, TrendDays)<0 then
> > > > begin
> > > > > NewHighVal=H;
> > > > > NewHigh=0;
> > > > > end
> > > > > else begin
> > > > > NewHighVal=NewHighVal[1];
> > > > > NewHigh=NewHigh[1];
> > > > > end;
> > > > > end;
> > > > > if L<NewLowVal[1] then begin
> > > > > NewLowVal=L;
> > > > > NewLow=NewLow[1]+1;
> > > > > end
> > > > > else begin
> > > > > if LinearRegAngle(AvgPrice, TrendDays)>0 then
> > > > begin
> > > > > NewLowVal=L;
> > > > > NewLow=0;
> > > > > end
> > > > > else begin
> > > > > NewLowVal=NewLowVal[1];
> > > > > NewLow=NewLow[1];
> > > > > end;
> > > > > end;
> > > > > Plot1(NewHigh,"New Highs");
> > > > > Plot2(-NewLow,"New Lows");
> > > > > Plot3(Excess,"OverB");
> > > > > Plot4(-Excess,"OverS");
> > > > > IF CheckAlert Then Begin
> > > > > IF Plot1 >= Plot3 then Alert("Overbought");
> > > > > IF Plot2 <= Plot4 then Alert("Oversold");
> > > > > IF Plot1 < Plot1[1] then Alert("Reset Count");
> > > > > IF Plot2 > Plot2[1] then Alert("Reset Count");
> > > > > End;
> > > > >
> > > >
> > ---------------------------------------------------
> > > > > 
> > > > > CandlelineRecord (Indicator)
> > > > >
> > > >
> > ---------------------------------------------------
> > > > > Variables: Lng(0),Supprt(c), Resistnce(c);
> > > > > Lng=Volatility(8);
> > > > > if Lng <= AbsValue(O - C) then begin
> > > > > if C>O then
> > > > > Supprt=(O+C)/2
> > > > > else
> > > > > supprt=supprt[1];
> > > > > if C<O then
> > > > > Resistnce=(O+C)/2
> > > > > else
> > > > > Resistnce=Resistnce[1];
> > > > > end;
> > > > > Plot1(Supprt,"Support");
> > > > > Plot2(Resistnce,"Resistance");
> > > > >
> > > >
> > ---------------------------------------------------
> > > > > 
> > > > > Appreciate the help very much
> > > > > 
> > > > > Thanks in advance
> > > > > 
> > > > > Tono
> > > > > 
> > > > > 
> > > > >       
> > > >
> > > 
> >
> 
______________________________________________________________________
> > > > ______________
> > > > > Be a better friend, newshound, and 
> > > > > know-it-all with Yahoo! Mobile.  Try it now.  
> > > >
> > >
> >
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> > > > > 
> > > > > [Non-text portions of this message have been
> > 
> === message truncated ===
> 
> 
> 
>       
______________________________________________________________________
______________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>



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

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/