• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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

        http://www.ninjatrader.com/support/h...rderstatus.htm
        http://www.ninjatrader.com/support/h...onaveragep.htm

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Ousher, Yesterday, 11:56 PM
        0 responses
        6 views
        0 likes
        Last Post Ousher
        by Ousher
         
        Started by djt1102, Yesterday, 07:55 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Marco  
        Started by jleira, Yesterday, 10:26 PM
        0 responses
        4 views
        0 likes
        Last Post jleira
        by jleira
         
        Started by wuileng, Yesterday, 10:14 PM
        0 responses
        6 views
        0 likes
        Last Post wuileng
        by wuileng
         
        Started by mntemel, Yesterday, 09:07 PM
        1 response
        10 views
        0 likes
        Last Post MojoJojo  
        Working...
        X