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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    46 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    14 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X