Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adjust stoploss in strategy

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

    Adjust stoploss in strategy

    Hi

    I have a working strategy that places an order and then uses ATM strategy to place target and stoploss

    I can use the strategy to move the stop and targets and that too is working

    My question is how can I find out what is the price of the 1st stoploss when the ATM places it

    Reason behind that is that since the movement of the stop is based on calculations I don't want the system to move it beyond a preset number of ticks

    I hope I was able to explain that properly

    Thank you in advance

    #2
    While there isn't a supported way to check the starting price of the ATM stop via code if you knew the properties of the ATM you could create a custom tracking variable to update accordingly.

    You can also use this for checking the status: http://www.ninjatrader.com/support/h...rgetorders.htm

    Let me know if I can further assist.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Lance View Post
      While there isn't a supported way to check the starting price of the ATM stop via code if you knew the properties of the ATM you could create a custom tracking variable to update accordingly.

      You can also use this for checking the status: http://www.ninjatrader.com/support/h...rgetorders.htm

      Let me know if I can further assist.
      I am using the status to trace the status and to modify the stops and targets. However I cant see the way to know what the price of the original stop was.

      the ATM will set that stop at x ticks from entry but that could vary from instrument to instrument. that is way I need to know the price set when the trade was filled.

      you said "if you knew the properties of the ATM you could create a custom tracking variable to update accordingly" any further clues that could help??? I believe I know the ATMstrategy ID

      AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Market, 0 ,0, TimeInForce.Day, orderIdB, "test " + vInstrument + m_NumberOfLots, atmStrategyIdB);


      Comment


        #4
        The stop will always be placed X ticks away from the average fill price. You can use this to get the average fill price and then use that to determine the initial stop price




        Let me know if I can further assist.
        LanceNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Aviram Y, Today, 05:29 AM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by algospoke, 04-17-2024, 06:40 PM
        3 responses
        26 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by bmartz, 03-12-2024, 06:12 AM
        3 responses
        30 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by gentlebenthebear, Today, 01:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by cls71, Today, 04:45 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X