Announcement

Collapse
No announcement yet.

%R System-need EFS

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

  • %R System-need EFS

    %R System-need Easylangauge to EFS transfer. Simple system, here's code:




    Vars: Trend(1),
    PerR( 0 ),
    StDev( 0 ),
    LastBar( 0 ),
    TrStop( 0 );

    StDev = StdDev(C,14);
    PerR = PercentR(10);

    If (PerR >= 70 and PerR[1] < 70) and Trend < 1 and Close > TrStop then
    Begin
    SetPlotColor(1,Blue);
    Plot1(Low - tick,"Signal");
    TrStop = L - StDev*1.382;
    Trend = 1;
    LastBar = BarNumber;
    End;

    If (PerR <= 30 and PerR[1] > 30) and Trend > -1 and Close < TrStop then
    Begin
    SetPlotColor(1,Red);
    Plot1(High + tick,"Signal");
    TrStop = High + StDev*1.382;
    Trend = -1;
    LastBar = BarNumber;
    End;

    If Trend = 1 then
    Begin
    If LastBar < BarNumber then
    Begin
    If TrStop = 0 then TrStop = Close;
    If Close > Close[1] then TrStop = Low - StDev * 1.382;
    If Low - High[1] > StDev then TrStop = Low - StDev * 0.618;
    If TrStop < TrStop[1] then TrStop = TrStop[1];
    End;
    Plot2(TrStop,"Stop");
    SetPlotColor(2,White);
    End;

    If Trend = -1 then
    Begin
    If LastBar < BarNumber then
    Begin
    If TrStop = 0 then TrStop = Close;
    If Close < Close[1] then TrStop = High + StDev * 1.382;
    If Low[1] - High > StDev then TrStop = High + StDev * 1.382;
    If TrStop > TrStop[1] then TrStop = TrStop[1];
    End;

    Plot2(TrStop,"Stop");
    SetPlotColor(2,Yellow);
    End;

    If PercentR(14) > 70 then
    Begin
    SetPlotColor(3,Blue);
    SetPlotColor(4,Blue);
    Plot3(High,"TREND");
    Plot4(Low,"TREND");
    End
    Else If PercentR(14) < 30 then
    Begin
    SetPlotColor(3,Red);
    SetPlotColor(4,Red);
    Plot3(High,"TREND");
    Plot4(Low,"TREND");
    End
    Else If PercentR(14) < 70 and PercentR(9) > 30 then
    Begin
    SetPlotColor(3,LightGray);
    SetPlotColor(4,LightGray);
    Plot3(High,"TREND");
    Plot4(Low,"TREND");
    End;
Working...
X