Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trailstop 1 tick below BID for long trades and 1 tick above ASK for short trades

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

    Trailstop 1 tick below BID for long trades and 1 tick above ASK for short trades

    Hello,

    i´m using an unmanaged strategy. So far i do the trailstop
    CalculateOnBarClose = true;
    below the low (low[0] - ticksize) and above the high (high[0] + ticksize)
    of an finished candle.

    I now like to test a trailstop
    CalculateOnBarClose = false;
    that trails 1 tick below the current Bid-Price for Long trades and
    1 tick above the current Ask-Price for Short trades.

    Is it possible to access this valued during live trading ?

    Thank you !

    #2
    nt2010, yes it is possible. You can use GetCurrentAsk() and GetCurrentBid() to get those prices. Those methods only work during a real-time test though. During backtesting, they will return the close price of the bar.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    55 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    142 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    160 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    96 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