Pivot Preference

 

Greetings.

This indicator is called Pivot Preference.  It plots (1-(P-S1)/(R1-P)) in a separate window, where P is the central Pivot (HLC/3), S1 is first support((2*P)-PreviousHigh), and R1 is first resistance((2*P)-PreviousLow).

This indicator (#PivPrefBias.mq4) has

#property indicator_separate_window

...now, it plots like this:

PivotPreference

this is PivPrefBias set to Daily...

...and, what I could never figure out is how to make it also Plot One Duration In The Future.  The only way I resolved this was by making a second indicator called #Bias_mod_beta.mq4 (attached).

Now, this Bias_mod_beta has

#property indicator_chart_window

 but later in the code, it uses a bool PlotTrend with in subwindow=1

bool PlotTrend(const long              chart_ID=0,
               string                  name="trendline",
               const int               subwindow=1,

 now, only if I place both of these indicators on the chart do I get One Future Duration

same chart as above, with both indi-s on, about 10 minutes later after some news just now

PivotPreferenceFuture

...see, now it plots the future Pivot Preference.

How to make it one Indicator? 

...or is it impossible? as per https://www.mql5.com/en/docs/customind/propertiesandfunctions

Files: