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

[EquisMetaStock Group] Re: Bi color MA



PureBytes Links

Trading Reference Links



Thank you for help with my bicolor MA. I did some small changes so 
the formula is now:
 Period:=Input("par", 1,250,1); 

X:= Mov(C,Period,S);
Blue:=If(X>C,X,C);
Red:=If(X<C,X,C);
Blue; Red;

In applications, for example Visual Trading Charts, itīs possible
that the "if" function returns a "null" value. Null then means that 
the indicator plots nothing when one write null in the if function. 
It seems that Metastock always have to plot a value. Is it possible 
that Metastock automatically have a red color when the red color 
argument is filled and blue color when the blue color argument is 
filled? I mean that when I draw down the bicolor MA indicator into 
the chart the red part of the indicator is already red, and the blue 
already blue. When I draw down the indicator now itīs only one 
color, the default color. And I then manually have to change to 
color for the MA parts > close resp. < close. I want to use quite 
many MA:s, and get a so called fishnet chart. Therefore it would be 
good if the bicolors are set automatically when the indicator is 
drawn into the chart. 

Thomas


--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxxx> wrote:
> 
> Thomas,
> 
> This is one of the red green indicators. 
> 
> {greater than less than}
> X:= {your indicator here};
> Green:=If(X>Ref(X,-1),X,0);
> Red:=If(X<Ref(X,-1),X,0);
> Green; Red;
> 
> In order to use it in your application you will need to make a few 
> changes to get the display your looking for. The indicator above 
> defaults to zero when the condition is not met. You are looking 
for a 
> price default. You could use high, low, open, or close. In your 
case 
> use the close. So the indicator becomes:
> 
> X:= Mov(C,20,S);
> Blue:=If(X>Ref(X,-1),X,C);
> Red:=If(X<Ref(X,-1),X,C);
> Blue; Red;
> 
> Next problem is the display. When this indicator is plotted you 
will 
> notice a line when indicator switches. To overcome this you will 
need 
> to plot in dashes rather than a solid line. You should also change 
> the size of the data to one size larger than the plot. This will 
hide 
> the indicator when its plotting on the close. 
> 
> Finally, I have changed the indicator from your request. RED is 
> always down. Its just easier to remember.
> 
> Hope this helps,
> 
> Preston
>  
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "timotej53" 
<timotej53@xxxx> 
> wrote:
> > 
> > 
> > Thanks for your answer. You wrote:
> > 
> > "In an expert, under the highlights tab, create new highlight
> > long
> > 
> > C>Mov(C,20,S)
> > 
> > 
> > create new highlight
> > Short
> > 
> > C<Mov(C,20,S)
> > 
> > attach this expert to a chart"
> > 
> > 
> > 
> > I was not enough clear in what i wanted. This highligt the base 
> > security, but not the moving averages. What I need is that the 
> > moving averages change color, depending if they are > or < than 
the 
> > base security value. For example the color of a moving average 
is 
> > red when itīs value is > base security value and blue when < 
base 
> > security value. Do you think itīs possible to code such an 
> indicator 
> > or expert. 
> > 
> > Regards,
> > 
> > Thomas








------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/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/