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

determining the tipping point of an average

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

    determining the tipping point of an average

    Hi All,

    I was hoping to get some direction on how to determine how to get the closing price that "tips" an average in the opposite direction before it actually happens and plots on the chart.

    For example: if we use a HMA(20) average and the average is pointing down. On an upclose the average will swing up at some point. That may be 2 or 3 ticks higher than the curent close. Specifically I would like to be able to determine the tipping point ( the closing price) for when HMA(20)[0] > HMA(20)[1].

    I am thinking that i need to maintain my own dataseries of the close and then loop thru the ticks to see when the moving average actually swings in the oppiste direction?

    Am I on the correct track or is there an easier way? Might someone know of an existing example either in the reference library or in on something that has been written in an existing in the forums?

    Thank you kindly in advance for your help

    Sammy

    #2
    Hi Sammy, I would unfortunately not be aware of an example here or custom code already shared, but the idea seems valid to me, you would need to loop though a series of closes / endpoints for your series to calculate the HMA on to see where it would start changing it's slope.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by SammyC View Post
      Hi All,

      I was hoping to get some direction on how to determine how to get the closing price that "tips" an average in the opposite direction before it actually happens and plots on the chart.

      For example: if we use a HMA(20) average and the average is pointing down. On an upclose the average will swing up at some point. That may be 2 or 3 ticks higher than the curent close. Specifically I would like to be able to determine the tipping point ( the closing price) for when HMA(20)[0] > HMA(20)[1].

      I am thinking that i need to maintain my own dataseries of the close and then loop thru the ticks to see when the moving average actually swings in the oppiste direction?

      Am I on the correct track or is there an easier way? Might someone know of an existing example either in the reference library or in on something that has been written in an existing in the forums?

      Thank you kindly in advance for your help

      Sammy
      Recast your requirement to this: "What should be the last value of the Input into the HMA, such that it will change the direction of the HMA?".

      Once you determine that value, the rest is just a matter of deducting the current close from that value, in order to determine how many ticks are left to go.

      As ticks are quantized values, it should be simple to use an incrementing/decrementing counter to determine the number of ticks required.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by chbruno, 04-24-2024, 04:10 PM
      4 responses
      50 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      10 responses
      398 views
      1 like
      Last Post beobast
      by beobast
       
      Started by lorem, Yesterday, 09:18 AM
      5 responses
      20 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by WHICKED, Today, 12:56 PM
      2 responses
      15 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by Felix Reichert, Today, 02:12 PM
      0 responses
      4 views
      0 likes
      Last Post Felix Reichert  
      Working...
      X