Velocity, Acceleration and Momentum
Forums › ProRealTime English forum › ProBuilder support › Velocity, Acceleration and Momentum
- This topic has 5 replies, 3 voices, and was last updated 1 year ago by robertogozzi.
-
-
03/27/2021 at 3:15 PM #165495
Hello everyone,
I’ve been looking for filter to avoid false signals and want to submit this idea for improvement and critical thinking… Please share your thoughts.
Nothing new, just compiling some physics principles. May be something similar exist already.
The two basic principales are the Velocity (https://en.wikipedia.org/wiki/Velocity) and the Momentum (https://en.wikipedia.org/wiki/Momentum), applied to price and volume.
For the price to make a signficant change in a sustainable manner, we need both acceleration in price change with signficant volume.
The problem I found comparing Intraday Volume to previous bars (Volume > Volume[1]) or to Intraday Average Volume or to volume same time on previous day doesn’t work consistently and may be impacted by Geopolitics, Macro, etc. Further, because of the large volume on the X first bars of the day, most of the volume bars are below the the Intraday Average Volume, so the filter is defeated.
Velocity = (Indicator – Indicator[1]) / (T – T[1])
Acceleration = (Velocity – Velocity[1]) / (T – T[1])
One can apply this idea to Close, MedianPrice, Averages, etc. I chose Hull Average in the exemple below because its one of the most sensitive.
Then, to move the price in a sustainable manner => Momentum = Mass * Velocity.
I chose to define Mass as (MedianPrice * Volume) “Mass of Money”.
For Long, if Acceleration (change is Velocity) is higher than its EMA and Momentum is positive and higher than its EMA, then if your Indicator(s), say Moving Average crossing or Stochastics, etc., give a Signal, there is a high probability that it’s not a false signal and you can enter the trade with more assurance. (the opposite for Shorts)
When you’re already in position, this might be used as Exit Signal in the opposite direction.
Please share your thoughts!
Velocity, Acceleration and Momentum123456789101112131415161718192021222324252627282930313233DEFPARAM CALCULATEONLASTBARS=500Period = 1PRICE = MEDIANPRICEMass1 = (PRICE * VOLUME)av1 = HullAverage[13](close)av2 = HullAverage[34](close)Velocity1Av1 = (av1 - av1[Period])/PeriodVelocity0Av1 = (av1[1] - av1[Period+1])/PeriodAcceleration1Avg1 = (Velocity1Av1 - Velocity0Av1) / PeriodEMAAcceleration1 = ExponentialAverage[8](Acceleration1Avg1)Momentum1 = Mass1 * Velocity1Av1EMAMomentum1 = ExponentialAverage[8](Momentum1)Velocity1Av2 = (av2 - av2[Period])/PeriodVelocity0Av2 = (av2[1] - av2[Period+1])/PeriodAcceleration1Avg2 = (Velocity1Av2 - Velocity0Av2) / PeriodEMAAcceleration2 = ExponentialAverage[8](Acceleration1Avg2)IF Acceleration1Avg1 > EMAAcceleration1 and Acceleration1Avg1 > Acceleration1Avg2 and Momentum1 > 0 and Momentum1 > EMAMomentum1 THENDRAWARROWUP(barindex, -1.5) coloured(0,255,0)ENDIFIF Acceleration1Avg1 < EMAAcceleration1 and Acceleration1Avg1 < Acceleration1Avg2 and Momentum1 < 0 and Momentum1 < EMAMomentum1 THENDRAWARROWDOWN(barindex, 1.5) coloured(255,0,0)ENDIFRETURN +2, -23 users thanked author for this post.
03/27/2021 at 3:41 PM #165497@GraHal @Nicolas @robertogozzi @Monochrome @Vonasi
Appreciate your thoughts on the above. Thanks
03/27/2021 at 6:00 PM #165501It’s a very nice and useful idea.
Thanks for sharing with us! 🙂
When drawing arrows I suggest that you use a more portable code. Instead of +1.5 and -1.5 you could use:
12(high + (range * 1.5))(low - (range * 1.5))what use is RETURN +2, -2 ?
1 user thanked author for this post.
03/27/2021 at 6:16 PM #16550308/27/2023 at 11:21 PM #21989108/28/2023 at 3:42 PM #219956It’s due to lines 5 and 6, where the variable PRICE is defined and used. It is now a RESERVED keyword (which wasn’t back then), so you should replace PRICE with myPRICE, like that:
12myPRICE = MEDIANPRICEMass1 = (myPRICE * VOLUME)1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on