The MBFX Timing indicator is one of the indicator of the well known “MOSTAFA BELKHAYATE” system.
In fact this oscillator could be compared to a classic stochastic. It displays in percentage the current movement of the price around a mean calculated by the a dynamic scale.
It is commonly use to take trade decisions with the “center of gravity” (also named COG) to detect the potential reversion to the mean of the price.
This version is translated from a Pinescript code by a request on the french forum.
//PRC_MBFX Timing | indicator
//25.04.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//translated from Pinescript indicator code
//---Settings
//showHLC=1 //boolean variable
//Range1=4
//Range2=8
//---End of settings
middle = (((high + low) / 2) + ((high[1] + low[1]) / 2) + ((high[2] + low[2]) / 2) + ((high[3] + low[3]) / 2) + ((high[4] + low[4]) / 2)) / 5
scale = (((high - low) + (high[1] - low[1]) + (high[2] - low[2]) + (high[3] - low[3]) + (high[4] - low[4])) / 5) * 0.2
hh = (high - middle) / scale
l = (low - middle) / scale
c = (close - middle) / scale
if showHLC then
ht=average[1]((hh+l+c)/3)
else
ht=c
endif
RETURN 0 coloured(100,100,100) style(dottedline,2) as "zero line", Range1 coloured(100,100,100) style(dottedline,1) as "SellLine1", Range2 coloured(100,100,100) style(dottedline,1) as "SellLine2", -Range1 coloured(100,100,100) style(dottedline,1) as "BuyLine1", -Range2 coloured(100,100,100) style(dottedline,1) as "BuyLine2", ht style(line,2) as "MBFX Timing"