Specification
Hi
I need this Indicator from Trade View made into an MT4 Expert Advisor
The EA needs to display on the chart the same as on Tradeview, note arrows show where the trade was triggered on the Candle.
Main thing i have found is the Lime green Fast Moving Average line needs to maintain the Square look Form/Structure as in below pic
1/ The EA needs to check it isn't missing signals as it may need to constantly re fresh to maintain Square form ?
2/ On each new signal the EA needs to check a Trade hasn't
already been opened in the same direction - If it has then don't open
the Trade.
3/ When no trades are open and I open a Trade manually the EA will take over from there.
4/ If i close a Trade the EA will wait for a new Signal or next manually opened Trade.
3/ The Fast Moving Average line needs to hold it's Square look Form/Structure in Strategy Tester also if possible ?
4/ Add Risk amount
5/ Lot size.
6/ Alert Sound and Popup.
7/ Magic number
8/ Able to adjust all settings
All code and rights to this EA to be owned by me ©
Code sent to me also
That's it
Thanks
Tradeview Code Below
strategy("Heikin Ashi Strategy V2",shorttitle="HAS V2",overlay=true,default_qty_value=1000,initial_capital=100000,currency=currency.EUR)
res = input(title="Heikin Ashi Candle Time Frame", type=resolution, defval="60")
hshift = input(1,title="Heikin Ashi Candle Time Frame Shift")
res1 = input(title="Heikin Ashi EMA Time Frame", type=resolution, defval="180")
mhshift = input(0,title="Heikin Ashi EMA Time Frame Shift")
fama = input(1,"Heikin Ashi EMA Period")
test = input(1,"Heikin Ashi EMA Shift")
sloma = input(30,"Slow EMA Period")
slomas = input(1,"Slow EMA Shift")
macdf = input(false,title="With MACD filter")
res2 = input(title="MACD Time Frame", type=resolution, defval="15")
macds = input(1,title="MACD Shift")
//Heikin Ashi Open/Close Price
ha_t = heikinashi(tickerid)
ha_open = security(ha_t, res, open[hshift])
ha_close = security(ha_t, res, close[hshift])
mha_close = security(ha_t, res1, close[mhshift])
//macd
[macdLine, signalLine, histLine] = macd(close, 12, 26, 9)
macdl = security(ha_t,res2,macdLine[macds])
macdsl= security(ha_t,res2,signalLine[macds])
//Moving Average
fma = ema(mha_close[test],fama)
sma = ema(ha_close[slomas],sloma)
plot(fma,title="MA",color=lime,linewidth=2,style=line)
plot(sma,title="SMA",color=red,linewidth=2,style=line)
//Strategy
golong = crossover(fma,sma) and (macdl > macdsl or macdf == false )
goshort = crossunder(fma,sma) and (macdl < macdsl or macdf == false )
strategy.entry("Buy",strategy.long,when = golong)
strategy.entry("Sell",strategy.short,when = goshort)