The algo i found online is as follows:
OldRange = (OldMax - OldMin)
NewRange = (NewMax - NewMin)
NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin
Assuming I can use this, I'm having difficulty knowing what numbers
to put in place of the variables.
would OldRange = Close[0] - Close[1] ?
would NewRange = 100 - 0 ? // or simply 100
what would be the value for OldValue ? //would it be Close[0] ?
Based on my assumptions NT code would be as follows
//-----in variables------------------ private double oldRange; private double newRange = 100; private double newValue; // ----- in OnBarUpdate--------------------- double oldRange = Close[0] - Close[1]; newValue = (((Close[0] - Close[1]) * newRange) / oldRange) + 0;
My ultimate goal is to examine the ratio between price and RSI bar by bar to detect "mini-divergences" to study and evaluate their usefulness for predicting the next bars direction.
Thanks in advance for any help.
Comment