The MegaFxProfit indicator is a trading signals oscillator that use the median price position according to the recent highest high and lowest low boundaries of the market price.
The oscillator use a small smoothing function to make it more readable and therefore give delayed but clear signals of the market direction.
It could assimilate to a moving average of median price that cut the middle of a Donchian channel to send trading signals. Nothin new here, but I translated it from MT4 version following a request in the trading indicators forum.
The MegaFX indicator plots green and red signal arrows according to the oscillator cross of the zero line. The indicator should be used in conjunction of any other technical analysis or other set of trading indicators.
//PRC_MegaFX Profit | indicator
//04.11.2019
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted from MT4 code
// --- settings
period=21
// --- end of settings
if barindex>period then
hhigh = highest[period](high)
llow = lowest[period](low)
mean = (High + Low) / 2.0
temp = 0.66 * ((mean - llow) / (hhigh - llow) - 0.5) + 0.67 * Ld36
temp = Min(Max(temp, -0.999), 0.999)
mega = Log((temp + 1.0) / (1 - temp)) / 2.0 + result / 2.0
Ld36 = temp
result = mega
if result crosses over 0 then
r=0
g=255
drawarrowup(barindex,result) coloured(r,g,0)
elsif result crosses under 0 then
r=255
g=0
drawarrowdown(barindex,result) coloured(r,g,0)
endif
endif
return result coloured(r,g,0) style(line,2) as "MegaFX Profit", 0 coloured(255,255,0) style(line,3) as "0 level"