Hello there. Can someone help me translating a TradingView strategy into a MQL5 strategy?
It's pretty easy and standard the strategy. Around 70 rows of code. This is the code:
------------------------------------------------------
//@version=4
strategy("RSI2", overlay=true)
//inizializzazione parametri
//RSI
src = close
len = input(2, minval=1, title="RSILength")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - 100 / (1 + up / down)
//medie mobili
mmlen = input(200, title="Slow MA len")
mmflen = input(50, title="Fast MA len")
machoice = input(defval="EMA", options=["SMA", "EMA"])
//soglie RSI
RSIthreshUP = input (90, title="Threshold RSI up")
RSIthreshDWN = input (10, title="Threshold RSI down")
//input ticker
tick=input(0.5,title="Ticker size",type=input.float)
filter=input(true,title="Trend Filter",type=input.bool)
mmslow = if machoice == "SMA"
sma(close, mmlen)
else
ema(close, mmlen)
mmfast = if machoice == "SMA"
sma(close, mmflen)
else
ema(close, mmflen)
plot(mmslow, color=color.white)
plot(mmfast, color=color.yellow)
//condizioni ingresso ed uscita mercato. Uscita non utilizzate
ConditionEntryL = if filter == true
mmfast > mmslow and close > mmslow and rsi < RSIthreshDWN
else
mmfast > mmslow and rsi < RSIthreshDWN
ConditionEntryS = if filter == true
mmfast < mmslow and close < mmslow and rsi > RSIthreshUP
else
mmfast < mmslow and rsi > RSIthreshUP
//ConditionExitL = (barssince(close>open)>2)
//ConditionExitS = (barssince(open>close)>2)
//impostazione trailing stop
ts = input(1, title="TrailingStop%", type=input.float)
ts_calc = close * (1/tick) * ts * 0.01
//ingressi ed uscite Mercato
if ConditionEntryL
strategy.entry("RSILong", strategy.long)
strategy.exit("ExitLong", "RSILong", trail_points=0, trail_offset=ts_calc)
//if (ConditionExitL)
// strategy.close ("RSILong")
if ConditionEntryS
strategy.entry("RSIShort", strategy.short)
strategy.exit("ExitShort", "RSIShort", trail_points=0, trail_offset=ts_calc)
//if (ConditionExitS)
// strategy.close ("RSIShort")
Pedidos semelhantes
Required to develop expert advisory which will work on any pair including crypto , forex, gold, silver, oil, simple stragy which will work on RSI,GRID, take profit, grid distance, start and stop button, only buy and only sell, filter for time frame Like 5m to 4 hr. stop loss and take profit .Detail will be shared once you except order
I want a profitable scalping EA robot for mt5 and mobile phones (licence key should be provided).the video link attached below indicates how the EA robot should operate it.it analyses the market before taking trades and it trades candle to candle .also coding samples are provided on the video .it should be applicable to all timeframes.it should trade indices(Nas100,US30,S&p500,GER30,)
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I am looking for a marketing tool that simulates a trading environment in MT5. While MT5 itself doesn't allow history manipulation for marketing purposes, consider exploring third-party trading simulators. These simulators offer customizable features like balances, entry prices, and account types, creating realistic scenarios for my audience
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
dreams good and have a great Cash out from your smart phone , tuyoywuiy glamorous flood see full idk idk slow so dolls stupid sis workouts who's spark koalas oral waits also doggo idk
I need a developer that can convert two Buy and Sell indicators into a trading robot. the indicators has an input parameter, this should be made available for adjustment. Features 1. Break Even 2. Trailing Stop 3. Global TP and SL 5. Time Filter 6. News Filter (If possible)
NRTR - indicator for MetaTrader 5 NRTR (Nick Rypock Trailing Reverse) - indicator for MetaTrader 4 NRTR WATR - indicator for MetaTrader 4 NRTR GATOR - indicator for MetaTrader 5 X2MA NRTR - indicator for MetaTrader 5 NRTR - indicator for MetaTrader 5 NRTR GATOR - indicator for MetaTrader 4 NRTR - indicator for MetaTrader 4 Stalin_NRTR - indicator for MetaTrader 5 NRTR Color Line - indicator for MetaTrader 5 NRTR Rosh
Create an Expert Advisor that collaborates between these indicators ETR, MEv2 and STLv3 with these features 1. SL and TP 2. TIME FILTER 3. ETR, MEv2 and STLv3 PARAMETERS BUY ENTRY STEP 1. FIRST candle OPEN above Symphonie Trend Line STEP 2. Check Symphonie Extreme must indicate color BLUE STEP 3. Check Symphonie Emotion must indicate color BLUE STEP 4. Open trade with money management STEP 5. Trade open MUST BE 1