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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    50 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
    16 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    22 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