Disliked{quote} Thanks sir appreciate your talent with time I bet you can find that mystery of ATR behind the DOT it's all I need in the regression channel including alert of course please sir you can get to the root even if it's next year as long as God continues to spare this one life we have, but there's no rush about it until you find time to look into it.RgdsIgnored
Like I said complex formular find regression line - and it checks if value is within ATR_gap and if that is swing low or high.
double ATR_Gap = 0.6 * iATR(Symbol(), 0, 50, 1);
this is the formula it sets dot on high side.
if ( Var_B > 0.0 &&
MathAbs(High[n] - Buffer_C[n]) < ATR_Gap &&
//peak
High[n] > High[n - 1] &&
High[n] > High[n + 1] &&
High[n] > High[n - 2] &&
High[n] > High[n + 2]
)
{
Buffer_High_Dot[n] = High[n] + ATR_Gap;
where as Var_B is
double Var_B = (SumOfClosePriceTimesIndex * barsToCount - SumOfIndex * SumofClosePrice) / Var_A;
..
there are very complex formular used in this format and it will require higher math to understand this formula.
It is beyond my scope to understand how those lines are drawn.
All I know is it find lines based on regression formula and if high is within range and it is swing H, it plot dots on high poin.
1