Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IsFirstTickOfBar

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

    IsFirstTickOfBar

    Does IsFirstTickOfBar only work with OnEachTick update or can work with other types too like OnPriceChange? I ask because running a strategy especially on an instrument like NQ can get bogged down with calculations made OnEachTick. So I use IsFirstTickOfBar to make most calculation once per bar. Is there something like IsFirstPriceOfBar in NT8?

    And my second question was does running Trail Stops on each tick bog down NT8 as much as strategy calculation on something like NQ? And I guess whether the Trail is done within the strategy or using the ATM will use the same amount of resources, correct?

    Thank you.

    #2
    Hello Trader17,

    That property will work with either OnEachTick or OnPriceChange per the documentation.

    For the second question that would not really be the same type of comparison. Updating an order is similar to you manually submitting an order, its just a single event being transmitted which is not a lot of resources. In the case of a trail it would just be submitting change orders. Your strategy logic has many other things it will be doing in the course of one call to OnBarUpdate which would take a lot more resources compared to updating an order. The ATM would use a similar amount of resources in regard to updating the order.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you. Do you have a link for that documentation? Did not find it in the Help Guide.

      And as for the second question, calculating the price distance for trail purposes and moving the stop when necessary is not as data intensive as calculating the strategy script? I thought it was still a calculation.

      Thanks.

      Comment


        #4
        Hello Trader17,

        You can find the documentation here: https://ninjatrader.com/support/help...FirstTickOfBar

        For your second question the actual trailing order change is not really resource intensive. The platforms built in trailing can work based on each tick and is not resource intensive based on what its doing. If your calculations are slow the rest of the actions your strategy completes will inherently be slow. You would either need to look at making your calculations more efficient or increase the processing power being used to account for whats being done.


        I look forward to being of further assistance.


        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Felix Reichert, 04-26-2024, 02:12 PM
        5 responses
        39 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
        15 responses
        45 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by ETFVoyageur, Yesterday, 06:05 PM
        6 responses
        37 views
        0 likes
        Last Post ETFVoyageur  
        Started by rbeckmann05, Today, 02:35 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by Torontobluejays, Yesterday, 08:43 AM
        6 responses
        34 views
        0 likes
        Last Post rc5781
        by rc5781
         
        Working...
        X