Announcement

Collapse
No announcement yet.

efs script request 1

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

  • efs script request 1

    I have two Tradestation scripts that I am attempting to convert to Esignal efs scripts.

    I will post the scripts in separate messages. The first is as follows:

    ***********************

    {efs script request 1}

    Inputs: Price((H+L+C+O)/4), Length(10), Const(2),Displace(1),OutsideUp(magenta),OutsideDwn (magenta);
    Variables: Avg(0), UpperK(0), LowerK(0), AbsDisp(0);

    Avg = Average(Price, Length);
    UpperK = KeltnerChannel(Price, Length, Const);
    LowerK = KeltnerChannel(Price, Length, -Const);

    If Displace >= 0 OR CurrentBar > AbsValue(Displace) Then Begin
    Plot1[Displace](UpperK, "B_Upper");
    Plot3[Displace](LowerK, "B_Lower");
    if plot1>plot1[1] then SetPlotColor(1,OutsideUp);
    if plot1<plot1[1] then SetPlotColor(1,OutsideDwn);
    if plot1=plot1[1] and plot1[1]>plot1[2] then SetPlotColor(1,OutsideUp);
    if plot1=plot1[1] and plot1[1]<plot1[2] then SetPlotColor(1,OutsideDwn);

    if plot3>plot3[1] then SetPlotColor(3,OutsideUp);
    if plot3<plot3[1] then SetPlotColor(3,OutsideDwn);
    if plot3=plot3[1] and plot3[1]>plot3[2] then SetPlotColor(3,OutsideUp);
    if plot3=plot3[1] and plot3[1]<plot3[2] then SetPlotColor(3,OutsideDwn);




    end;

    inputs: Price1((H+L+C+O)/4 ), Length1( 2 ), Displace1( 1.25 ) ;

    if Displace >= 0 or CurrentBar > AbsValue( Displace ) then
    begin
    Plot4[Displace1]( AverageFC( Price1, Length1 ), "Avg" ) ;

    { Alert criteria }
    if Displace <= 0 then
    begin
    if Price > Plot1 and Plot1 > Plot1[1] and Plot1[1] <= Plot1[2] then
    Alert( "Indicator turning up" )
    else if Price < Plot1 and Plot1 < Plot1[1] and Plot1[1] >= Plot1[2] then
    Alert( "Indicator turning down" ) ;
    end ;
    end ;

    *********************************

    Thanks,

    DaTr8dr

  • #2
    Hello DaTr8dr,

    Have you tried any of our existing Keltner formulas in the EFS library? I'm not that familiar with the TS code, so I'm sure if one of our existing formulas will work for you. Check those out first and let me know.

    EFS Library - Discussion Board
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X