Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Easy Language into Ninja Script

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

    Easy Language into Ninja Script

    Hi

    I have TS Easy Language code (Pivot Reversal LE and Pivot Reversal SE) and want to get same translated into Ninja code for automated trading. Can someone help me out.

    Thanks in Advance.
    Parv

    ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++
    PIVOT REVERSAL LONG ENTRY:

    [IntrabarOrderGeneration = false]
    inputs: Strength( 4 ) ;
    variables: Setup( false ), PivotHigh( 0 ) ;

    if SwingHigh( 1, High, Strength, Strength + 1 ) <> -1 then
    { ie, if just confirmed SwHi }
    begin
    Setup = true ;
    PivotHigh = High[Strength] ;
    end
    else if Setup and High >= PivotHigh + 1 point then
    Setup = false ;
    { the High >= condition being true indicates that a buy must already have been triggered at this bar so this setup has been used up and needs to be negated; an example of a persisitent setup with an indefinite stop/limit trigger - setup has to be negated after entry confirmed; also see Keltner Channel LE/SE and PercentR LE/SE }

    if Setup then
    Buy ( "PivRevLE" ) next bar at PivotHigh + 1 point stop ;


    PIVOT REVERSAL SHORT ENTRY:

    [IntrabarOrderGeneration = false]
    inputs: Strength( 4 ) ;
    variables: Setup( false ), PivotLow( 0 ) ;

    if SwingLow( 1, Low, Strength, Strength + 1 ) <> -1 then
    { ie, if just confirmed SwLo }
    begin
    Setup = true ;
    PivotLow = Low[Strength] ;
    end
    else if Setup and Low <= PivotLow - 1 point then
    Setup = false ;
    { the Low <= condition being true indicates that a short must already have been triggered at this bar so this setup has been used up and needs to be negated; an example of a persisitent setup with an indefinite stop/limit trigger - setup has to be negated after entry confirmed; also see Keltner Channel LE/SE and PercentR LE/SE }

    if Setup then
    Sell Short ( "PivRevSE" ) next bar at PivotLow - 1 point stop ;

    #2
    Parv8, thanks for posting your code - if no one from the community steps up, you could always check with those NinjaScript consultants to get the conversion done for you - http://www.ninjatrader.com/webnew/pa...injaScript.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    596 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    343 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    556 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    554 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X