Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

strategy calculation with OnEachTick vs Ninja's Inbuilt ATM default template

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

    strategy calculation with OnEachTick vs Ninja's Inbuilt ATM default template

    Hello,

    This question is critical. Please understand my question so I can get clear guidance.


    I have Built strategy for NQ future product. NQH0324 ticker. NQ is very very volatile during market hours. It really moves more than 20 to 30 ticks in matter of seconds as example in real time.

    I have built strategy for NQ with On Each Tick calculate. It works stable too.

    ----
    For this strategy My stop loss and Take profit hits exactly at 20 ticks TP and 10 Ticks Stop Loss, as per my ONEACHTICK calculation based strategy input.


    So, one day I compared execution of my NQ strategy with EXACT 20 TICKS TP AND 10 TICKS SL with NQ strategy WITH COMPARION OF EXECUTION - USING NINJATRADER'S OWN DEFAULT CUSTOM ATM TEMPLATE (i kept same exact 20 PTS Tp and 10 Ticks SL in ATM template).

    I did side by side execution with NQ strategy (using each tick) and by using Ninja's Default ATM template (20 pts TP/10 pts SL).


    -------

    But order execution for TP and SL was different for NQ-each tick strategy vs using Ninja's default inbuilt ATM template tool.

    -------------------------
    ----------------------

    So, NOW MY QUESTION is:

    why there is difference in execution when TP and SL hits? If I used Each tick vs Ninja's default ATM template?

    -----------
    I am thinking now that, maybe Ninja's ATM template is more Quick, fast and accurate , than using EACH tick based Strategy code? is that true? or maybe it's true during only HIGH VOLATILITY MOVEMENT OF ASSET/INSTRUMENT?


    Please provide me critical advise here.










    #2
    Hello manitshah915,

    Thanks for your post.

    Is the custom NinjaScript strategy using ATM Strategy Methods to submit orders? Or, are you using the Managed Approach or Unmanaged Approach for submitting orders?

    How exactly did you go about testing this behavior?

    Did you run test this on a Sim101 account while connected to a live data feed connection or was the Playback connection used with Market Replay data?

    Could you please share a screenshot highlighting the execution differences that you are referring to?
    • To send a screenshot with Windows 10 or newer I would recommend using the Windows Snipping Tool.
    • Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save it as a jpeg file and send the file as an attachment.
    ​We look forward to assisting further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      i didn't use ATM strategy method.

      Instead I did this exactly.

      Once I take entry at 18550 of NQ. Then, This is what strategy running with Each tick does.

      It processes data on each tick Change.

      Then, If there is +20 ticks Maths.Calculation above. then, system will send command to sell that 1 lot from 18550.

      Or, before hitting 20 ticks, If price is down by 10 ticks from 18550. then also, strategy willl send order command to sell 1 Lot from 18550.

      So, this is unmanaged approach.



      ---------------------

      Now, without getting into so much technicals. Please answer my exact original question and guide me.

      Why there is execution mismatch when I do strategy execution with 20 ticks TP and 10 pts SL, Via A). using each tick strategy execution v/s B), using ninja's default ATM template with 20 TP and 10 SL.


      ----
      is this because ATM template is more faster and more robust, then using eachtick calculation for volatile product like NQ?



      --

      Be on the topic discussion please. Don't get into rookie things like sending screenshots and sending data filtes and log files. I am not here for administrative technical assitance.

      This is critical discussion regarding approach of execution..

      Comment


        #4
        Hi NinjaTrader_ChelseaB. No offense, but Brandon has not been able to guide me thru my question, like the way you provide insight usually. I will appreciate if you can chime in -read my question and thread and guide me.

        NinjaTrader_BrandonH : I was looking for guidance here and I didn't get from you as expected. So, Time for me to ask help with better experienced tech support team. In the past posts, ChelseaB has given me great insights.

        Comment


          #5
          Hello manitshah915,

          Thanks for your notes.

          Without a clear example of what you are describing it is difficult to know what would be expected in the scenario.

          The Atm Strategy submits targets and stops based on the entry fill and then offsets them based off the average fill price of the entry order.

          You could do a similar task in a NinjaScript strategy by submitting orders based on the entry fill and using its average price for the offsets you calculate.

          Since the ATM Strategy code is internal and we cannot disclose that information, we otherwise would not be able to answer specifically how the ATM Strategy is programmed to function. Further, we do not know if what you are doing is similar to how an ATM Strategy submits orders.

          You could create a sample script that submits a single entry order in real-time so we can see how you are submitting targets and stops and then also submit an ATM from code using ATM Strategy Methods to see if there is some difference between the two. If so, you could share an exported copy of the script with us and the steps used to reproduce the behavior using the script to show us exactly what you are describing so we may advise if the behavior is expected or not.
          Brandon H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Haiasi, 04-25-2024, 06:53 PM
          2 responses
          17 views
          0 likes
          Last Post Massinisa  
          Started by Creamers, Today, 05:32 AM
          0 responses
          5 views
          0 likes
          Last Post Creamers  
          Started by Segwin, 05-07-2018, 02:15 PM
          12 responses
          1,786 views
          0 likes
          Last Post Leafcutter  
          Started by poplagelu, Today, 05:00 AM
          0 responses
          3 views
          0 likes
          Last Post poplagelu  
          Started by fx.practic, 10-15-2013, 12:53 AM
          5 responses
          5,408 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Working...
          X