Topic: Most

Hi again everybody,
i have a very powerful indicator from a Turkish inventor.
i worked hard and can not convert it to make an indicator formula for fsb.i cannot find a document for help.
can anyone convert this indicator(most) for fsb,or can anyone give me a link about converting document.
This is the formula.

 yuzde:=Input("yuzde-% of trailing stop",0,100,2);
period:=Input("period",1,100000,3);
yy1:=Input("1=ussel mov,2=simple mov,3=weight mov,4=hull mov",1,4,1);
bb:=Sqrt(period);
aa1:=Mov(C,period/2,W);
aa2:=Mov(C,period,W);
aa3:=Mov(2*aa1-aa2,LastValue(bb),W);
a1:=If(yy1=2,Mov(C,period,S),If(yy1=3,Mov(C,period ,W),If(yy1=4,aa3,Mov(C,period,E))));
a2:=a1-(a1*yuzde/100);
a3:=a1+(a1*yuzde/100);
b1:=If(a1<PREV,a2,Max(a2,PREV));
b2:=If(a1>PREV,a3,Min(a3,PREV));
k1:=Cross(a1,Ref(b2,-1));
k2:=Cross(Ref(b1,-1),a1);
k3:=Cum(k1+k2>-1)=1;
k4:=Cum(k1)=1;
s1:=BarsSince(k3 OR k1)
< BarsSince(k3 OR k2)+k4;
s2:=If(s1=1,b1,b2);
a1;s2

Re: Most

I'm sure Ahmed will take a look wink

In the meantime what language is it? Or from what platform? What do you mean by "powerful"? Is it just a moving average crossover indicator in principle?

3 (edited by aysamatik 2014-01-19 00:50:58)

Re: Most

it depends on moving stoploss. A moving average following the price and most is following them percent.
it is metastock formula.

Re: Most

1-- I think this block to calculate the hull moving average

bb:=Sqrt(period);  //1
aa1:=Mov(C,period/2,W);//2
aa2:=Mov(C,period,W);///3  ( 1,2 &3 ) are the ingredients to calculate the Hull MA 
aa3:=Mov(2*aa1-aa2,LastValue(bb),W);  // and this is the hull moving average 

2-- this part of code used to calculate MA logic Simple, weighted , Exp and the new invented Hull in the previous part
and after calculating the MA a2 & a3 are %MA bands Values used to build a new MA ( b1 &b2)

a1:=If(yy1=2,Mov(C,period,S),If(yy1=3,Mov(C,period ,W),If(yy1=4,aa3,Mov(C,period,E))));
a2:=a1-(a1*yuzde/100);
a3:=a1+(a1*yuzde/100);
b1:=If(a1<PREV,a2,Max(a2,PREV));
b2:=If(a1>PREV,a3,Min(a3,PREV));

Now we have two Lines
1st line is the Normal MA line and
2nd MA% line of the 1st Line  which use the same logic used in gan hilo activator coding
Note:Other part of code including Cum And BarsSince need to be used with the 2nd MA% line , iam trying to configure the corresponding  in C# !!!!

Attached the original MS indicator picture

Post's attachments

most Metastock indicator.gif
most Metastock indicator.gif 5.65 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Most

You rock, Ahmed! cool

Re: Most

footon wrote:

You rock, Ahmed! cool

Thanks Fotton
But still trying to solve barsince  issue

attached picture is the not 100% perfect FSB solution smile

Post's attachments

Ma plus gan hilo activator.gif
Ma plus gan hilo activator.gif 15.54 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Most

Yes,this is it. smile

Re: Most

?

Re: Most

first attempt without Cum And BarsSince hope it will help !!

Post's attachments

MA & mapercent Crossover.cs 15.42 kb, 8 downloads since 2014-01-27 

You don't have the permssions to download the attachments of this post.

Re: Most

Thank you very very much.

Re: Most

welcome