Please help code the "sve_trends_trail" indicator.

 

Hi all

If anyone could help with this indicator. I've used it successfully in VT Trader but was sent packing from this platform and now need to learn to trade in MT4. Has anyone converted it to MT4 yet, if not, could a generous someone please try, as I've only just started learning MT4 programming.

Thanks in advance...

Edd.

Here is the code in Metastock if it helps?

{SVE_TRENDS_Trail trailing stop function}
atrfact:=Input("ATR multiplication :",1,10,2.8);
period:=Input("ATR Period :",1,100,10);
HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
diff1:=Max(HiLo,Href);
diff2:=Max(diff1,Lref);
ATRmod:=Wilders(diff2,period);
loss:=atrfact*ATRmod;
resistance:= C + loss;
support:=If(L>=Ref(L,-2) AND Ref(L,-1)>=Ref(L,-2) AND Ref(L,-3)>=Ref(L,-2) AND Ref(L,-4)>= Ref(L,-2),Ref(L,-2),
If(L>Ref(H,-1)*1.0013,Ref(H,-1)*0.9945,
If(L>PREV*1.1,PREV*1.05,
PREV)));
trends:=
If(H>PREV AND Ref(H,-1)>PREV,
Max(PREV,support),
If(H<PREV AND Ref(H,-1)<PREV,
Min(PREV,resistance),
If(H>PREV,support,resistance)));
trends

 
fxedd:

Hi all

If anyone could help with this indicator. I've used it successfully in VT Trader but was sent packing from this platform and now need to learn to trade in MT4. Has anyone converted it to MT4 yet, if not, could a generous someone please try, as I've only just started learning MT4 programming.

Thanks in advance...

Edd.

Here is the code in Metastock if it helps?

{SVE_TRENDS_Trail trailing stop function}
atrfact:=Input("ATR multiplication :",1,10,2.8);
period:=Input("ATR Period :",1,100,10);
HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
diff1:=Max(HiLo,Href);
diff2:=Max(diff1,Lref);
ATRmod:=Wilders(diff2,period);
loss:=atrfact*ATRmod;
resistance:= C + loss;
support:=If(L>=Ref(L,-2) AND Ref(L,-1)>=Ref(L,-2) AND Ref(L,-3)>=Ref(L,-2) AND Ref(L,-4)>= Ref(L,-2),Ref(L,-2),
If(L>Ref(H,-1)*1.0013,Ref(H,-1)*0.9945,
If(L>PREV*1.1,PREV*1.05,
PREV)));
trends:=
If(H>PREV AND Ref(H,-1)>PREV,
Max(PREV,support),
If(H<PREV AND Ref(H,-1)<PREV,
Min(PREV,resistance),
If(H>PREV,support,resistance)));
trends


Hi all you gurus

I posted this request about a week ago but no respose from anyone. Could anyone let me know if this Indicator is at all posible to code in MT4 or not.

Thank you,

Edd

 
fxedd:


Hi all you gurus

I posted this request about a week ago but no respose from anyone. Could anyone let me know if this Indicator is at all posible to code in MT4 or not.

Thank you,

Edd

nearly everything is possible. The normal answer to your post is:

No slaves here, learn to code or pay someone to do it.

So you say you begun to learn MQL, show the code you have done up to now.


//z

 

> could a generous someone please try...

They would have to be very generous - there are many functions in there to model & recode...

-BB-

 
BarrowBoy:

> could a generous someone please try...

They would have to be very generous - there are many functions in there to model & recode...

-BB-


No worries,

I'll attempt doing it... on my own.... I've started and am half way through coding it already.

Thanks, anyway.

Edd