Metastock to MT4 - page 2

 

Metastock Fisher Signal Convert to Metatrader

Hi...guys ,, need your help to solve my coding

has anybody could convert this metastock code to be MQL4.

pr:=(H+L)/2;

len:=7;

maxh:=HHV(pr,len);

minl:=LLV(pr,len);

val1:=.33*2*((pr-minl)/(maxh-minl)-.5)+.67*PREV;

value1:=If(val1>.99,.999,If(val1<-.99,-.999,val1));

fish:=.5*Log((1+value1)/(1-value1))+.5*PREV;

fish;

Ref(fish,-1);

Regards

sAThya

 
sathya:
Hi...guys ,, need your help to solve my coding

has anybody could convert this metastock code to be MQL4.

I guess this indcaitor is on this thread:https://www.mql5.com/en/forum/174980

Specially on the last posts, 90 and over.

 
 

Thanks cockeyedcowboy for sharing this email in here!I think that using more than one TA software platform it's a GOOD thing to do for any trader.

 
vladv:
Thanks cockeyedcowboy for sharing this email in here!I think that using more than one TA software platform it's a GOOD thing to do for any trader.

I believe its a promo for there software but its also gets into TA on a more basic level for beginers.

Having a secondary software that one can keep an eye on the other markets is also a good thing. MetaTrader does not give you that ability. Forex is not the end all.

I personally use AmiBroker pro software with seperate data feeds. For the money its the best buy availible. (Hope this is not classified as spam.)

Keit

 

metastock to MT

Can anyone recode this ind from metastock to MT?

ZigZig Fixed 3%

perc:=3;

tr:=ValueWhen(1,Zig(C,perc,%)>Ref(Zig(C,perc,%),-1) AND

Ref(Zig(C,perc,%),-1)<Ref(Zig(C,perc,%),-2),Ref(Zig(C,perc,%),-1));

tr:=If( (C-tr)*100/tr>= perc ,tr,0);

tr:=If( tr=0, ValueWhen(1,tr0,tr), tr);

pk:=ValueWhen(1,Zig(C,perc,%)<Ref(Zig(C,perc,%),-1) AND

Ref(Zig(C,perc,%),-1)>Ref(Zig(C,perc,%),-2),Ref(Zig(C,perc,%),-1));

pk:=If((C-pk)*100/pk <=-perc , pk, 0);

pk:=If( pk=0, ValueWhen(1,pk0,pk), pk); res:=If(pkRef(pk,-1), -1,

If(trRef(tr,-1), 1, 0));

res:=If(res=0,ValueWhen(1,res0,res),res);

res

 

How to convert a Metastock formula to MT4 one.

Is there any program to convert the Metastock formula to MT4 formula.Can You help me please to write MT4 formula converting Metastock formula as fallows;

Days:=Input("zzz : ",1,50,3);

Var1:=If(CLOSE>Ref(Mov(H,Days,E),-1),1,If(CLOSE<Ref(Mov(L,Days,E),-1),-1,0));

Var2:=ValueWhen(1,Var10,Var1);

Var3:=If(Var2=-1,Mov(H,Days,E),Mov(L,Days,E));

Var3;

 

need help please

hello all

thank you for this great forum

i have a metastock indicators code and i need to change them to mq4 is that possible ?

 

these are the codes please help to change them to mq4 coz they are the greatest indicators ever you cant find them any where except here

[LegacyColorValue = true];

Inputs:

prix(Close), Price (Close)

periode(32), period (32),

np(2), np (2),

Coul_asc(Blue), Coul_asc (Blue)

Coul_desc(Red), Coul_desc (Red)

Coul_Norm(Green), Coul_Norm (Green)

Shift(1); Shift (1);

Var: Bam_G_V (0); Var: Bam_G_V (0);

Bam_G_V = G_Filter(prix, periode, np); Bam_G_V = G_Filter (price, period, np);

Plot1(Bam_G_V, "BAM G FILTER"); Plot1 (Bam_G_V, "BAM FILTER G");

if Bam_G_V > Bam_G_V[1] then if Bam_G_V> Bam_G_V [1] then

SetPlotColor[Shift]( 1, Coul_asc ) SetPlotColor [Shift] (1, Coul_asc)

else if Bam_G_V < Bam_G_V[1] then else if Bam_G_V <Bam_G_V [1] then

SetPlotColor[Shift]( 1, Coul_desc ) SetPlotColor [Shift] (1, Coul_desc)

else

SetPlotColor[Shift]( 1, Coul_Norm ); SetPlotColor [Shift] (1, Coul_Norm);

the second

// Settings: / / Settings:

// "B Indicateur : Histo / / "B Indicator: Histo

// "B Timer : Point / / "B Timer: Point

// / /

Inputs:

Prix((h+l)/2), Price ((h + l) / 2),

Periode(20), { Periode pour calculer l'ATR et la DEVIATION STD } Period (20), (Period to calculate the ATR and STD DEVIATION)

Fac_Keltner(1.5), { Facteur ATR pour les bandes Keltner } Fac_Keltner (1.5), (ATR factor for bands Keltner)

Fac_Bollinger(2),{ Facteur DEVIATION STD pour les bandes de Bollinger } Fac_Bollinger (2), (STD DEVIATION factor for Bollinger bands)

AlertLine( 1 ), { Niveau d'alerte /cette version ne gre pas les alertes } AlertLine (1), (Alert Level / this version does not gre alerts)

Couleur_Alerte( Blue ), Couleur_Alerte (Blue)

Couleur_Normale(Red); Couleur_Normale (Red);

Variables:

ATR(0), { Average True Range } ATR (0), () Average True Range

StDev(0), { Deviation Standard } StDev (0), () Standard Deviation

BBS_Ind(0), { l'indicateur } BBS_Ind (0), the indicator ()

alertTextID(-1); alertTextID (-1);

if barnumber = 1 and alertTextID = -1 then if Barnumbir = 1 and then alertTextID = -1

alertTextID = Text_New(date,time,0,"dummy"); alertTextID = Text_New (date, time, 0, "dummy");

//Calcul du Squeeze / / Calculating Squeeze

ATR = AvgTrueRange(Periode); ATR = AvgTrueRange (period);

StDev = StandardDev(Prix, Periode, 1); StDev StandardDev = (Price, period, 1);

BBS_Ind = (Fac_Bollinger * StDev) / (Fac_Keltner * ATR); BBS_Ind = (Fac_Bollinger StDev *) / (* Fac_Keltner ATR);

If BBS_Ind < Alertline then If BBS_Ind <AlertLine then

SetPlotColor(1, Couleur_Normale) SetPlotColor (1, Couleur_Normale)

else

SetPlotColor(1, Couleur_Alerte); SetPlotColor (1, Couleur_Alerte);

Plot1(0, "B indicateur"); Plot1 (0, "B indicator");

value2 = LinearRegValue(Prix-((Highest(H, Periode)+Lowest(L, Periode))/2 value2 = LinearRegValue (Price-((Highest (H, period) + Lowest (L, Period)) / 2

+

xAverage(c,Periode))/2,Periode,0); xAverage (c, Period)) / 2, Period, 0);

var:color(0); color = yellow; var: color (0); color = yellow;

if value2>0 then if value2> 0 then

if value2 > value2[1] then if value2> value2 [1] then

color = green color = green

else

color = darkgreen; color = darkgreen;

if value2<0 then if value2 <0 then

if value2 < value2[1] then if value2 <value2 [1] then

color = red color = red

else

color = darkred; color = darkred;

plot3(value2,"B timer",color); plot3 (value2, "B timer, color);

the third one

Inputs: Price (NumericSeries) Period (NumericSimple), Np (NumericSimple);

variables: aa(0), b(0), w(0), x(0), y(0), y1(0), y2(0), y3(0), y4(0), variables: aa (0), b (0), w (0), x (0), y (0), y1 (0), y2 (0), y3 (0), y4 (0),

a_1(0), a_12(0), a_13(0), a_14(0), a2(0), a3(0), a4(0), Pi(3.141592654), a_1 (0), a_12 (0), a_13 (0), a_14 (0), a2 (0), a3 (0), a4 (0), Pi (3.141592654)

sqrtOf2(1.414213562); sqrtOf2 (1.414213562);

If (Np >= 1) and (Np = 1) and (Np <= 4) then

begin

if CurrentBar = 1 then if CurrentBar = 1 then

begin

w = 2 * Pi / Periode; w = 2 * Pi / Period;

w = 180 * w / Pi; w = 180 * w / Pi;

b = (1 - cosine(w)) / (power(sqrtOf2, 2.0/Np) - 1.0); b = (1 - cosine (w)) / (power (sqrtOf2, 2.0/Np) - 1.0);

aa = -b + squareroot(b*b + 2*b); aa = squareroot-b + (b + 2 * b * b);

a_1 = 1.0 - aa; a_1 = 1.0 - aa;

a_12 = a_1 * a_1; a_12 = a_1 * a_1;

a_13 = a_1 * a_1 * a_1; a_13 = a_1 * a_1 * a_1;

a_14 = a_12 * a_12; a_14 = a_12 * a_12;

a2 = aa * aa; a2 = aa aa *;

a3 = aa * aa * aa; a3 = aa * * aa aa;

a4 = a2 * a2; a4 * a2 = a2;

y1 = Prix; y1 = Price;

y2 = y1; y2 = y1;

y3 = y2; y3 = y2;

y4 = y3; y4 = y3;

end;

x = Prix; x = Price;

if (Np = 1) then if (Np = 1) then

y = aa * x + a_1 * y1 aa * y = x + a_1 * y1

else if (Np = 2) then else if (Np = 2) then

y = a2 * x + 2 * a_1 * y1 - a_12 * y2 y = a2 + x * 2 * a_1 * y1 - a_12 * y2

else if (Np = 3) then else if (Np = 3) then

y = a3 * x + 3 * a_1 * y1 - 3 * a_12 * y2 + a_13 * y3 a3 * y = x + 3 * a_1 * y1 - 3 * a_12 * y2 + a_13 * y3

else if (Np = 4) then else if (Np = 4) then

y = a4 * x + 4 * a_1 * y1 - 6 * a_12 * y2 + 4 * a_13 * y3 - a_14 * y4; a4 * y = x + 4 * a_1 * y1 - 6 * a_12 * y2 + 4 * a_13 * y3 - a_14 * y4;

y4 = y3; y4 = y3;

y3 = y2; y3 = y2;

y2 = y1; y2 = y1;

y1 = y; y1 = y;

G_filter = y; G_filter = y;

end

else

G_filter = 0.0; G_filter = 0.0;

 
Malcik:
Hi, I figured I would use this indicator too I attempted to convert it to MT4 from VTrader... here's the original code:

_pfe:= Mov(If(pr>Ref(pr,-length),sqrt(Power(Roc(pr,length,Points),2) + Power(10,2)) /

Sum(Sqrt(Power(Roc(pr,1,Points),2)+1),length),-

Sqrt(Power(Roc(pr,length,Points),2) + Power(10,2)) /

Sum(Sqrt(Power(Roc(pr,1,Points),2)+1),length))*100,smooth,E);

And the MT4 version is in the attachment. However, it doesn't look like the original one (check the picture), the original one is smoother. Plus, I had to put a fixed period because when it was a variable, it always returned zero.

I'm a bad programmer, so I ask anyone willing to help to check the MT4 code and correct the errors, generally it should be somewhat right.

And, as you can see from the picture, it's worth it to have this indicator in MT4, very useful, so do it for your own good

Thanks!

PolarizedFractaEfficiency.mq4

Developed by Hans Hannula TASC 12:1 "Polarized fractal Efficiency"

this should be good