Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy handing off to ATM successfully but ATM settings ignored.

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

    Strategy handing off to ATM successfully but ATM settings ignored.

    Hi there...

    I have a strategy that is entering the market using an ATM... which it seems to be doing OK... however, the ATM stop and trail settings are either being ignored or mis-calculated.

    In the attached images, you can see the strategy has entered the market long. Although the markers are not appearing properly (something to do with replay and strategies), the entry is on the very last candle pictured.

    In image 00: you can see it is using the correct strategy as indicated by the lightning bolt symbol showing ATM in use

    in image 01: you can see the initial stop settings for the ATM

    in image 02: you can see the trail settings for the ATM

    For some reason, the trailing stop is being set only about 8 ticks away instead of the 30 specified.

    When I use the ATM in the live market and manually place a trade, this ATM works as expected.

    Previously when I've been back testing a strategy on market replay and using ATM hand off, it has worked.

    For some reason it is handing off to ATM but ignoring the ATM settings in market replay. (I have not tested in live market yet)

    Any help with this?

    Thanks.

    Note: here is the call to initiate the ATM
    AtmStrategyCreate(
    OrderAction.Buy
    , OrderType.Market
    , 0
    , 0
    , TimeInForce.Day
    , orderId
    , useATMName
    , atmStrategyId
    , (atmCallbackErrorCode, atmCallBackId) =>
    {
    //check that the atm strategy create did not result in error, and that the requested atm strategy matches the id in callback
    if (atmCallbackErrorCode == ErrorCode.NoError
    && atmCallBackId == atmStrategyId)
    {isAtmStrategyCreated = true;}
    else
    {Print("ATM ERROR MSG: " + atmCallbackErrorCode.ToString());}
    }
    );​
    Attached Files
    Last edited by halgo_boulder; 04-20-2024, 08:55 AM.

    #2
    Hi Brandon,

    Thank you for testing this and providing a test script.

    I ended up re-writing the ATM hand off using your test script and it seems to work now.

    Not sure what was wrong with it previously.

    Thank you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    71 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X