trending or momentum?

A fixed increase means the slope is decreasing. For example,
Code:
perl -e 'use warnings; use strict; my $curPrice = 100; my $incr = 2;
for (my $i = 1; $i <= 10; ++$i)
{
    my $slope = $incr / $curPrice;
    my $nextPrice = $curPrice + $incr;
    print "i $i curPrice $curPrice incr $incr slope $slope nextPrice $nextPrice\n";
    $curPrice = $nextPrice;
}'

Result:
i 1 curPrice 100 incr 2 slope 0.02 nextPrice 102
i 2 curPrice 102 incr 2 slope 0.0196078431372549 nextPrice 104
i 3 curPrice 104 incr 2 slope 0.0192307692307692 nextPrice 106
i 4 curPrice 106 incr 2 slope 0.0188679245283019 nextPrice 108
i 5 curPrice 108 incr 2 slope 0.0185185185185185 nextPrice 110
i 6 curPrice 110 incr 2 slope 0.0181818181818182 nextPrice 112
i 7 curPrice 112 incr 2 slope 0.0178571428571429 nextPrice 114
i 8 curPrice 114 incr 2 slope 0.0175438596491228 nextPrice 116
i 9 curPrice 116 incr 2 slope 0.0172413793103448 nextPrice 118
i 10 curPrice 118 incr 2 slope 0.0169491525423729 nextPrice 120

I am sorry, I cannot understand your code?
 
But as everyone knows, or should, momentum can be decreasing while at the same time price continues to increase. Momentum can then resume increasing, and of course, price as well so looking at momentum alone is insufficient. Or trend.
 
Second Concept:
Momentum measures the slope of a trend.

I would say the slope of price can be measured to identify changes in momentum.

Each VIAC leg up has a higher degree trend line which shows the momentum accelerating.
upload_2021-5-26_13-7-9.png
increasing.
 
Last edited:
I am sorry, I cannot understand your code?

The code calculates the slope by dividing the fixed $2 increase of a stock that starts out at $100 and outputs the day index, old price, price increase from the previous day, slope from the previous day to the current day, and the current price.

So after 1 day, the slope was 2/100, and the current price is 102. After 2 days, the slope is 2/102, and the current price is 104. After 3 days, the slope is 2/104, and the current price is 106. ...

The slope is not constant, and each day, the slope gets a little smaller.
 
The code calculates the slope by dividing the fixed $2 increase of a stock that starts out at $100 and outputs the day index, old price, price increase from the previous day, slope from the previous day to the current day, and the current price.

So after 1 day, the slope was 2/100, and the current price is 102. After 2 days, the slope is 2/102, and the current price is 104. After 3 days, the slope is 2/104, and the current price is 106. ...

The slope is not constant, and each day, the slope gets a little smaller.

Haaa, I understand your point.
 
Back
Top