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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    574 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X