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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    68 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    62 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X