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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
//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" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Excellent job like always!! are you working also on the Barycenter indicator?
No but I think you can find a lot of different version of the “center of gravity – COG” indicator in the forums.
I found a version of the Belkhayate COG indicator here:
https://www.prorealcode.com/topic/center-of-gravity/#post-19393 (Link button not working with Safari v12)
The Mostafe Belkhayate provided the rules here: http://www.mbfxsystem.com/mbfx-manual.pdf
Yet, this is the only time using PRT however that I haven’t been able to get a system to take one single trade based on rules of a trading system! That’s including with relaxing the buy and sell rules, even reversing them so that a buy trade is taken on a crossover of the upper red COG lines (already tried price “equals” and price crosses under with no luck).
The main problem is that you will find the COG and the Timing Indicator are never in time with each other (ironic right?). I used of the zero lines too for the “Timing” Chart (instead of price being between the -4 and -8 for long trades and +4 and +8 for the shorts), again no luck… I also tried using “previous periods” in the assisted creation too but again – not one singe trade on years of 4 hour S&P 500’s (or 1 hour data). If anyone ever gets it to take a trade please let me know.
The COG code in the topic you mentioned uses DPO to get the future price in order to simulate the repainting behavior of the Center of Gravity (polynomial regression). That’s the reason why you’ll never get any chance to trigger the order like the way it should by looking at price chart of the past, because the COG wasn’t at the same place in real time.
Cheers @Nicolas, If Belkhayate’s COG Barycentre is repainting in his automated system, how does he get it to line up with his Timing indicator?
I’m wondering if anyone has his original COG/Barycenter code? I searched for a long time and found these two Metatrader Timing codes (EA and Indicator code), but am unable to open them. I’m hoping at least one of them has the original Timing code because his Timing Indicator uses a simple colour coded green and red line with yellow being the trigger: https://www.dropbox.com/s/zicf73tybcn46oj/mbfx.png?dl=0
MT4:
https://www.dropbox.com/s/1e67aphhup88va5/MBFXTiming.ex4?dl=0
https://www.dropbox.com/s/jybngiclxcs692n/MBFXTiming.mq4?dl=0
Also is there anyway to get the Ehler’s Centre of Gravity indicator (with added std dev lines) onto a Price chart?
Thanks again,
Ps/ Here’s a good explanation of COG / Linear Regression repainting for anyone who prefers a visual chart example: https://forums.babypips.com/t/linear-regression-channel/67772/6
The concept is simple. It’s the almost simple strategy based on mean reversing you can find. Wait for the price to exceed a very large standard deviation and bet on its return to its mean and with a confirmation with that so called timing indicator which is nothing more than a renamed stochastic oscillator. This strategy has gained success in the late 2000 because of the repainting issue that showed great signals on the past data.
Anyway, there’s nothing more here than in any other mean reversion strategy, the fact is that it depends on how you represent the price deviation and its reversion. It’s pretty similar to your beloved Kase Dev Stop;)
Cheers Nicolas and sorry, I had no notification you’d replied here?
there’s nothing more here than in any other mean reversion strategy,
…Except now I get to play with linear regression and STE bands! Lol.
Hi
I want MBXF Timing for mq5
Does anyone have this indicator???
Hi Nicolas
good work for the code translation
when i chek the mbfx system site i see in the indicator picture that the line is coloured in red, yellow and green
it is possible to have the same colors in your prt code?
thanks
Yes, just change the color by yourself in the indicator settings window.