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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    57 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X