Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM strategy order and stop management

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

    ATM strategy order and stop management

    I have an ATM strategy. Have two questions:

    Q1. When I open a position it seems to take a while before the strategy gets back the information that the order has been filled using
    GetAtmStrategyEntryOrderStatus(orderId).

    Is there any other way that I can get the information faster?


    Q2. I can get the ATM strategy to move my stop as I wish, but I cannot seem to get the ATMstrategy to query the actual value of the stop after I move it manually. So is there any way to do this?

    #2
    Hello frannt,

    1. GetAtmStrategyEntryOrderStatus(orderId) will return the values as soon as it is filled, so if you want to get it fast then you may want to change how/when you are calling it.

    For example you may want to call it inside of OnBarUpdate() and then turn CalculateOnBarClose (COBC) to false so that you can get OnBarUpdate() to calculate on each tick of data but separate some of your logic to calculate when a new bar has formed with FirstTickOfBar. Here is an example of how you can separate out your logic.



    2. The easiest way to do this would be to set the Price to a variable, and use that variable to set the Changed Stop/Target Price so you can access it later to know the Price.
    Note that OnOrderUpdate() will not be called when using AtmStrategies in NinjaScript.

    Let us know if you have any questions.
    JCNinjaTrader Customer Service

    Comment


      #3
      OK, did all that. Thanks. Now I am getting the fill information more quickly and can move my stop manually.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Stanfillirenfro, Today, 07:23 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      2 responses
      20 views
      0 likes
      Last Post cmtjoancolmenero  
      Started by olisav57, Yesterday, 07:39 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by cocoescala, 10-12-2018, 11:02 PM
      7 responses
      944 views
      0 likes
      Last Post Jquiroz1975  
      Started by oviejo, Today, 12:28 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X