Attachments forums

List of attachments posted on this forum.


All files on forums: 135942

Re: Ehlers Indicators for MT4

ionone, Sun Apr 10, 2022 11:14 pm

converted from TradingView

Code: Select all

//@version=2
// https://www.tradingview.com/u/shayankm/
study("MESA Phase [SHK]")

DomCycle = input(15)
offsetNum = input(-2,"Offset")
RealPart = 0
ImagPart = 0

for J = 0 to DomCycle - 1
	Weight = (close[J] + close[J] + high[J] + low[J]) * 10000
	if DomCycle != 0
		RealPart := RealPart + cos(90 * J / DomCycle) * Weight * 2
		ImagPart := ((ImagPart + sin(90 * J / DomCycle) * Weight) + (ImagPart + sin(180 * J / DomCycle) * Weight)) / 2

Phase = ((atan(ImagPart / RealPart)) - 0.685) * 100

plot(0,color=gray)
plot(Phase,color=purple,linewidth=3,offset=offsetNum)
All files in topic