Support Board
Date/Time: Thu, 28 Nov 2024 01:23:29 +0000
[User Discussion] - Find the calculation Formula
View Count: 1668
[2014-03-04 23:30:05] |
Moti - Posts: 63 |
Hi, I want to find the way to calculate a Factor that will represent a change in percentage or coefficien. between buyers and sellers. Mathematically specking: In the actual bar I have a delta of +100 Buyers, One bar before I have a delta -3000 buyers. +100-(-3000) =3100, I divide 3100 /100 = 31 But... When: In the actual bar I have a delta of +3000 buyers , One bar before I have a delta -100 buyers. +3000-(-100) =2900 I divide 2900/3000 = 0.96 Its about the same absolute change in the delta in the both examples, but one with 31 and one is 0.96 with my simple calculation. Please help with to find the way to calculate with sufficient. Thank you, Moti Date Time Of Last Edit: 2014-03-04 23:30:34
|
[2014-03-06 05:59:01] |
vegasfoster - Posts: 444 |
Try taking the current value or current change, depending on what you want to figure, and divide by the difference between the min and max value or min and max change for the previous x number of periods, e.g. 100. So say max value is +5000 and min value is -3000, you will end up with something like 3100/8000 and 2900/8000.
Date Time Of Last Edit: 2014-03-06 06:02:13
|
[2014-03-06 14:10:09] |
Sawtooth - Posts: 4120 |
Google 'calculating negative percentages' Here are some results: http://mathforum.org/library/drmath/view/55720.html http://polymathprogrammer.com/2008/11/28/percentage-calculation-with-negative-numbers/ |
[2023-03-04 16:26:34] |
ondafringe - Posts: 286 |
Your first calculation is correct, but your second calculation is wrong. +100-(-3000) = 3100 3100/100 = 31 31 * 100 = 3100 +3000-(-100) = 3100 3100/3000 = 1.03333 1.03333 * 3000 = 3099.99 However, I don't think that's the correct way to calculate what you are after. Don't have time now, but if nobody else comes in with an answer, I'll take another look at it when I have more time. Date Time Of Last Edit: 2023-03-04 17:10:37
|
[2023-03-04 20:45:02] |
ondafringe - Posts: 286 |
Okay, back... As I understand, you want to calculate the percent difference between buyer deltas from one bar to the next. So, in your first example, you went from a -3000 up to a +100, which is a change of +3100. Current delta minus prior delta = delta change +100-(-3000) = +3100 Delta change divided by prior delta = multiplier +3100/-3000 = -1.03333 (rounded) Multiplier times prior delta = delta change -1.03333 * -3000 = +3100 (rounded up from 3099.99) Delta change plus prior delta = current delta +3100+(-3000) = +100 In your second example, you went from a -100 up to a +3000, which is also a change of +3100 Current delta minus prior delta = delta change +3000 -(-100) = +3100 Delta change divided by prior delta = multiplier +3100/-100 = -31 Multiplier times prior delta = delta change -31 * -100 = +3100 Delta change plus prior delta = current delta +3100+(-100) = +3000 In the first example, you have a 103.333% (1.03333 x 100) increase from the prior bar. -3000 * 103.333% = 3100 (rounded up from (3099.99) In the second example, you have a 3,100% (31 x 100) increase from the prior bar. -100 * -3100% = 3100 I *think* the above is correct, but I'm open to being wrong, if someone else wants to check my math! lol Date Time Of Last Edit: 2023-03-04 22:33:48
|
To post a message in this thread, you need to log in with your Sierra Chart account: