Announcement

Collapse
No announcement yet.

ELA code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ELA code

    Hi all ,

    Irecently purchased Metastock and was wondering if anyone knows what language it runs best with?

    I have an ela. code that i wish to input into Metastock but i,m noy sure how to do this does any of you wizards know??

    plz help me on this one i'm really stuck

    This is an example of the code that i need to change - this is for trend breaks

    INPUT: TRENDLEN(20);

    VALUE1=@MOMENTUM(C,3);
    VALUE2=@MOMENTUM(C,3)[1];
    VALUE3=0.3*(VALUE1-VALUE2)+(1-0.3)*VALUE3;
    VALUE4=WAVERAGE((VALUE3),6);
    VALUE5=@RSI(C,9)+VALUE4;

    { DETERMINE THEN BEGINNING AND ENDING POINTS OF AN UPWARD TREND LINE. }

    VALUE6 = SWINGLOWBAR(1,LOW,3,TRENDLEN);
    PRINT("DATE: ",DATE:0:0," TIME: ",TIME:4:0," SWINGLOWBAR 1ST# = ",VALUE6:2);
    IF VALUE6 > -1 THEN BEGIN
    VALUE7 = SWINGLOWBAR(1,LOW,3,TRENDLEN)[VALUE6];
    PRINT("DATE: ",DATE:0:0," TIME: ",TIME:4:0," SWINGLOWBAR 2ND# = ",VALUE7:2);
    IF VALUE7 > -1 THEN BEGIN
    VALUE8 = TLVALUE(LOW,VALUE6,LOW,VALUE7,-1);
    PRINT("DATE: ",DATE:0:0," TIME: ",TIME:4:0," TREND LINE UP = ",VALUE8);
    END;
    END;

    { DETERMINE THEN BEGINNING AND ENDING POINTS OF A DOWNWARD TREND LINE. }

    VALUE9 = SWINGHIGHBAR(1,HIGH,3,TRENDLEN);
    PRINT("DATE: ",DATE:0:0," TIME: ",TIME:4:0," SWINGLOWBAR 1ST# = ",VALUE9:2);
    IF VALUE9 > -1 THEN BEGIN
    VALUE10 = SWINGHIGHBAR(1,HIGH,3,TRENDLEN)[VALUE9];
    PRINT("DATE: ",DATE:0:0," TIME: ",TIME:4:0," SWINGLOWBAR 2ND# = ",VALUE10:2);
    IF VALUE10 > -1 THEN BEGIN
    VALUE11 = TLVALUE(HIGH,VALUE9,HIGH,VALUE10,-1);
    PRINT("DATE: ",DATE:0:0," TIME: ",TIME:4:0," TREND LINE DN = ",VALUE11);
    END;
    END;

    { BREAKOUT OF A DOWNWARD TREND LINE. }
    CONDITION1=SLOWD(9)[1]LOWD(9);
    CONDITION2=VALUE4[1]CONDITION3=VALUE5[1]CONDITION4=VALUE5>50;
    CONDITION5=CLOSE>VALUE11;

    { BREAKOUT OF AN UPWARD TREND LINE. }
    CONDITION6=SLOWD(90)[1]>SLOWD(9);
    CONDITION7=VALUE4[1]>VALUE4;
    CONDITION8=VALUE5[1]>VALUE5;
    CONDITION9=VALUE5<50;
    CONDITION10=CLOSE
    IF VALUE9 < VALUE6 AND VALUE10 < VALUE7 THEN BEGIN
    IF {CONDITION1 AND CONDITION2 AND CONDITION3 AND CONDITION4 AND} CONDITION5 THEN BUY ON CLOSE;
    END;

    IF VALUE9 > VALUE6 AND VALUE10 > VALUE7 THEN BEGIN
    IF {CONDITION6 AND CONDITION7 AND CONDITION8 AND CONDITION9 AND} CONDITION10 THEN SELL ON CLOSE;
    END;

  • #2
    silverxx12
    Metastock uses its own formula language.
    Alex

    Comment

    Working...
    X