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

Concern about tick size

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

    Concern about tick size

    Hello my friends,

    Something went wrong while running a few tests in market replay.
    Instrument 6C.
    Please see my image screen attached. In the output window I asked to print the Swing size channel divided by the TickSize:

    Print(Time.ToString() + " || " + ( Math.Max(High[0],Swing(5).SwingHigh[0]) - Math.Min(Low[0],Swing(5).SwingLow[0]) ) / TickSize);

    Following the time line, at 7:31, the value is correct = 10.
    At 7:32, the value dripped to 4.5 but the channel is still expanding. All of sudden I noticed the TickSize was cut by half. And the money size in the DOM is US$ 5 instead of original US$ 10 per tick.

    That is really strange. I havent changed any parameter in my instrument list.
    Please help,
    Thanks
    Attached Files
    mcosta72
    NinjaTrader Ecosystem Vendor - Quant-Wise

    #2
    Hello mcosta72,

    Thank you for your post.

    I am testing this on my end and I will follow up with you when I have details on this matter.

    Comment


      #3
      Hello mcosta72,

      Thank you for your patience.

      If you print the High and Low swing when you print the ticks you will notice that the ticks are accurate to the distance of the High and Low swing when they were printed to the Output.
      Code:
      			Print(Swing(5).SwingHigh[0]);
      			Print(Swing(5).SwingLow[0]);
                  Print(Time.ToString() + " || " + ( Math.Max(High[0],Swing(5).SwingHigh[0]) - Math.Min(Low[0],Swing(5).SwingLow[0]) ) / TickSize);
      However, due to the fact that the Swing indicator wait a set number of bars before considering a bar it's high or low (the strength parameter) then what you print on the bar may not be what you see as the plot a few bars later.

      The strength parameter is used to look X number of bars forward and backward from the bar to determine if it truly was a swing High or Low. Is generally not used to view it's value in real-time as it's value will likely change on the current bar when you look back at the current bar later.

      Please let me know if you have any questions.

      Comment


        #4
        In addition, I would recommend using the function available from the Swing indicator called SwingHighBar and SwingLowBar. These will allow you to accruately pull the swing values, but keep in mind to wait the same number of bars as the strength or more to ensure the swing value is constant. For example:
        Code:
        Print("The high of the swing bar is " + High[Math.Max(0, Swing(5).SwingHighBar(0, 1, 10))]);
        For more information please visit the following link: http://ninjatrader.com/support/helpGuides/nt7/swing.htm

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by mmenigma, Today, 02:22 PM
        0 responses
        2 views
        0 likes
        Last Post mmenigma  
        Started by frankthearm, Today, 09:08 AM
        9 responses
        35 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by NRITV, Today, 01:15 PM
        2 responses
        9 views
        0 likes
        Last Post NRITV
        by NRITV
         
        Started by maybeimnotrader, Yesterday, 05:46 PM
        5 responses
        26 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by quantismo, Yesterday, 05:13 PM
        2 responses
        21 views
        0 likes
        Last Post quantismo  
        Working...
        X