Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Converting EL code to Ninja code

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

    Converting EL code to Ninja code

    Hi
    Would anybody be willing to convert the enclosed EL code from Tradestation
    so I can use it in Ninja Trader Charting.
    Thank you

    --------------------------------------------------------------------

    Inputs: Len1(3),Price1(AvgPrice),Price2(High),Price3(Low), fac(.0382);


    Plot1 (Value1(price2,fac),"PrcntAbv");

    Plot2 (Value1(price3,fac),"PrcntBlw");

    Plot3(XAverage(Price1,Len1),"Bullseye");

    if Value1(price2,fac) > Value1(price2,fac)[1] then begin
    Plot4 (Value1(price2,fac),"PrcntAbv+");
    end;
    if Value1(price3,fac) < Value1(price3,fac)[1] then begin
    Plot5(Value1(price3,fac),"PrcntBlw-");
    end;


    ----This is calc for Value1------MWDXAverage------------

    VARS : FACTOR(0);
    VALUE2=2/FAC-1;

    IF VALUE2 + 1 <> 0 THEN BEGIN

    IF CURRENTBAR <= 1 THEN BEGIN

    FACTOR = 2 / (VALUE2 + 1);

    VALUE1 = PRICE;

    END

    ELSE

    VALUE1 = FACTOR * PRICE + (1 - FACTOR) * VALUE1[1];

    END;
    ----------------------------------------------------------------------

    #2
    Hello anatop,

    Welcome to the NinjaTrader forums!

    Hopefully another community member can offer translation for you. You may also consider a NinjaScript consultant, who can be hired for this type of service:
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RookieTrader, Today, 09:37 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by alifarahani, Today, 09:40 AM
    0 responses
    5 views
    0 likes
    Last Post alifarahani  
    Started by Gerik, Today, 09:40 AM
    0 responses
    4 views
    0 likes
    Last Post Gerik
    by Gerik
     
    Started by KennyK, 05-29-2017, 02:02 AM
    3 responses
    1,283 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by AttiM, 02-14-2024, 05:20 PM
    11 responses
    185 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X