lovetotrade
Member
hi @barbaros i have a very. nice strategy that i will like to be able to trade regular. here is the code:
thank you in advance!
Code:
# EZ Trend & Momentum strategy
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/IzvxaVhB-ROMI2/
def s2 = MovAvgExponential(close, 13) - MovAvgExponential(close, 21);
plot line = s2;
plot ZeroLine = 0;
line.AssignValueColor(if s2 <= 0 then Color.RED else Color.GREEN);
AssignPriceColor(if s2 <= 0 then Color.RED else Color.GREEN);
#Alert(s2 crosses above ZeroLine, "Cross above 0", Alert.BAR, Sound.Ring);
#Alert(s2 crosses below ZeroLine, "Cross below 0", Alert.BAR, Sound.Bell);
AddOrder(OrderType.BUY_AUTO, s2 crosses above ZeroLine, tickcolor = GetColor(1), arrowcolor = GetColor(1), name = "LE");
AddOrder(OrderType.SELL_AUTO, s2 crosses below ZeroLine, tickcolor = GetColor(2), arrowcolor = GetColor(2), name = "SE");
thank you in advance!
Last edited by a moderator: