Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy porting from tradestation

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

    strategy porting from tradestation

    Hello im new to strategy programming on ninja trader, could use any/some amount of help here.

    Ive got tradestation code i want to convert:
    Code:
    If MarketPosition = 0 Then Begin
    Buy at Open of next bar + BuyTrig Stop;
    Sell at Open of next bar - SellTrig Stop;
    End;
    Basically what its trying to do is to buy/sell a stop order at the open of the next bar, incremented by a certain variable (BuyTrig/SellTrig).

    How do i do this in NT? Would appreciate the help thanks.
    Ian

    #2
    Hi, you can use EnterLongStop and set liveUntilCancelled to true - http://www.ninjatrader-support.com/H...rLongStop.html

    In NinjaTrader limit / stop orders will expire at the end of the bar if not resubmitted or kept alive - http://www.ninjatrader-support.com/H...verview36.html

    To check for your market position you can use Position.MarketPosition - http://www.ninjatrader-support.com/H...tPosition.html

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    582 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    338 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
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X