Polynomial Regression Channel Price Break Channel

JoshuaMu
106

Am coding a polynomial regression dashboard when price breaks the upper or lower channel line. Am using the i-Regr-2.0.mq5 indicator published here https://www.mql5.com/en/code/28375

The indicator has 2 buffers for the upper channel line and lower line as below;

 SetIndexBuffer(0,hBuffer,INDICATOR_DATA);

 SetIndexBuffer(4,lBuffer,INDICATOR_DATA);

My set doubles are like this;

   double hBuffer = Regression_BufferValue(SymbolNum, TFNum, 0, shift);
   double lBuffer = Regression_BufferValue(SymbolNum, TFNum, 4, shift);

What's the right coding when price breaks the upper channel and lower channel line? Have tried; hbuffer < Price_Typical all in vain.

Help!

Regression Channel with variable polynomial degree
Regression Channel with variable polynomial degree
  • www.mql5.com
Regression Channel with variable polynomial degree - indicator for MetaTrader 5. EA - work in progress.
William Roeder
27511
William Roeder  
 SetIndexBuffer(0,hBuffer,INDICATOR_DATA);
 SetIndexBuffer(4,lBuffer,INDICATOR_DATA);

Those buffers are arrays. Your assignments makes no sense. (and won't compile)

JoshuaMu
106
JoshuaMu  
William Roeder #:

Those buffers are arrays. Your assignments makes no sense. (and won't compile)

It's compiling

My problem is getting the code for the channel price break.When i use;

hBuffer < PRICE_TYPICAL

lBuffer > PRICE_TYPICAL
The buffers don't return when price break about the upper channel or below it. Someone help me get the right coding
JoshuaMu
106
JoshuaMu  

My problem was the price to use

I eventually got the right price to use in-accordance to the dashboard. Dashboard runs perfectly now