Need help in converting Metastock code to Tradestation easylanguage

mircovento

Newbie
1 0
Need help in converting Metastock code to Tradestation easylanguage
Can somebody please help in converting this Metastock Code to Tradestation Easy Language.

Regards & Thanks in advance

CD:= Input("MACD", 3, 9, 4);
P1:=ValueWhen(1,Peak(1,Mov(MACD(),4,S),CD),Peak(1,Mov(MACD(),4,S),CD));
Mov(MACD(),4,S);

P2:=ValueWhen(1,Trough(1,Mov(MACD(),4,S),CD),Trough(1,Mov(MACD(),4,S),CD));
Mov(MACD(),4,S);

{Fibonacci retracement levels calculation}
P3 := P2 + (P1-P2)*0.236;
P4 := P2 + (P1-P2)*0.382;
P5 := P2 + (P1-P2)*0.5;
P6 := P2 + (P1-P2)*0.618;
P7 := P2 + (P1-P2)*0.764;

{Plotting the levels}
P2; {through}
P3; {23.6% (76.4%) retracement}
P4; {38.2% (61.8%) retracement}
P5; {50.0% retracement}
P6; {61.8% (38.2%) retracement}
P7; {76.4% (23.6%) retracement}
P1; {peak}
 

Similar threads


AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock