指定
Below is the pine eidtor script convert it to MQL5 coding language and create bot based on following condition
1. This all should be on 5-minute chart timeframe
2. For Buy side, buy after closing of second candle when buy signal is given and hold buy position until sell signal is given.
3. For sell side, sell after closing of second candle when sell signal is given and hold sell position until next buy signal will be given.
4. Stoploss should be the low of previous 4 candles after giving buy signal
5. for buy position lot size should be 0.01
6. for sell position lot size should be 0.01
//@version=5
strategy("Gold Bot", overlay=true)
// Inputs
a = input(2, title='Key Value (Sensitivity)')
c = input(1, title='ATR Period')
h = input(false, title='Signals from Heikin Ashi Candles')
// EMA Smoothing Inputs
len = input.int(9, minval=1, title="EMA Length")
offset = input.int(title="Offset", defval=0, minval=-500, maxval=500, display=display.data_window)
typeMA = input.string(title="Smoothing Method", defval="SMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Smoothing", display=display.data_window)
smoothingLength = input.int(title="Smoothing Length", defval=5, minval=1, maxval=100, group="Smoothing", display=display.data_window)
// ATR Calculation
xATR = ta.atr(c)
nLoss = a * xATR
// Source Selection
src = h ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close, lookahead=barmerge.lookahead_off) : close
// ATR Trailing Stop Calculation
xATRTrailingStop = 0.0
iff_1 = src > nz(xATRTrailingStop[1], 0) ? src - nLoss : src + nLoss
iff_2 = src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0) ? math.min(nz(xATRTrailingStop[1]), src + nLoss) : iff_1
xATRTrailingStop := src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0) ? math.max(nz(xATRTrailingStop[1]), src - nLoss) : iff_2
// Position Calculation
pos = 0
iff_3 = src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0) ? -1 : nz(pos[1], 0)
pos := src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0) ? 1 : iff_3
// EMA Calculation
ema = ta.ema(src, len)
// Smoothing Calculation
smoothingLine = switch typeMA
"SMA" => ta.sma(ema, smoothingLength)
"EMA" => ta.ema(ema, smoothingLength)
"SMMA (RMA)" => ta.rma(ema, smoothingLength)
"WMA" => ta.wma(ema, smoothingLength)
"VWMA" => ta.vwma(ema, smoothingLength)
// Buy and Sell Conditions
above = ta.crossover(ema, xATRTrailingStop)
below = ta.crossover(xATRTrailingStop, ema)
buy = src > xATRTrailingStop and above
sell = src < xATRTrailingStop and below
// Stop Loss Calculation
stopLossLevel = ta.lowest(low, 3)
// Strategy Execution
if (buy)
strategy.entry("Long", strategy.long, stop=stopLossLevel)
if (sell)
strategy.close("Long")
// Plotting
plot(ema, title="EMA", color=color.blue, offset=offset)
plot(smoothingLine, title="Smoothing Line", color=#f37f20, offset=offset)
plotshape(buy, title='Buy', text='Buy', style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), textcolor=color.new(color.white, 0), size=size.tiny)
plotshape(sell, title='Sell', text='Sell', style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), textcolor=color.new(color.white, 0), size=size.tiny)
barcolor(src > xATRTrailingStop ? color.green : na)
barcolor(src < xATRTrailingStop ? color.red : na)
// Alerts
alertcondition(buy, 'UT Long', 'UT Long')
alertcondition(sell, 'UT Short', 'UT Short')
応答済み
1
評価
プロジェクト
372
17%
仲裁
23
39%
/
30%
期限切れ
18
5%
取り込み中
2
評価
プロジェクト
20
10%
仲裁
2
50%
/
50%
期限切れ
0
暇
3
評価
プロジェクト
15
7%
仲裁
1
0%
/
100%
期限切れ
1
7%
取り込み中
4
評価
プロジェクト
258
21%
仲裁
18
61%
/
17%
期限切れ
1
0%
多忙
5
評価
プロジェクト
16
19%
仲裁
2
50%
/
50%
期限切れ
0
暇
6
評価
プロジェクト
1
0%
仲裁
3
0%
/
0%
期限切れ
0
取り込み中
7
評価
プロジェクト
7
14%
仲裁
1
0%
/
0%
期限切れ
2
29%
仕事中
8
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
9
評価
プロジェクト
2
0%
仲裁
0
期限切れ
0
暇
10
評価
プロジェクト
200
72%
仲裁
4
100%
/
0%
期限切れ
1
1%
暇
11
評価
プロジェクト
6
0%
仲裁
0
期限切れ
3
50%
取り込み中
12
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
13
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
14
評価
プロジェクト
1
0%
仲裁
1
0%
/
0%
期限切れ
1
100%
仕事中
15
評価
プロジェクト
428
38%
仲裁
87
44%
/
18%
期限切れ
71
17%
多忙
類似した注文
The Moving Average Cross needs debugging for live chart . [Condition 1] Personalized Omega Trailing Stop Loss ( Details of how it works will be provided , If still necessary the expert where it works just fine will be provided . ) Couple of Input parameters that needs to be removed (previous dev just added ) [ He can be contacted if necessary ]. Following are the implementations required by my expert : 1. Auto Lot
Searching for a Renko EA
30 - 100 USD
Hello everyone I'm searching for a Renko EA which is of course profitable. As far as I know prop firms or brokers in general don't offer the renko chart so it must be calculated manually. The renko also doesn't print a new block at every candle like the heikin ashi. I guess if we could combine heikin ashi candles incl. Renko then it's a strong momentum for a reversal. Would love to see what you already built in this
i need an expert who has experience and can help me with my project, I want to extract a hidden source code (pine script) from an Tradingview Indicator. and i need it to be done as soon as possible, If you are an expert on this field kindly comments
Objects reader PIN
100+ USD
Hi I have an indicator that create objects in the chart and using those following some rules the new indicator will create external global variables with value = 0 ( NONE ), = 1 ( BUY ) or = 2 ( SELL ). The global variable will use PIN external integer number . PINS are by now global variables (GV) whose name indicates the pair name and the PIN belonging and their value indicates it direction/action. PINS GV names
I'm looking for an experienced programmer who can extract hidden Pine Script source code from a TradingView indicator. This indicator is essential to my trading strategy, and I need the code to customize it further. If you have a strong background in Pine Script and understand TradingView’s architecture, let’s work together to unlock this code
I need a skilled programmer to help extract hidden source code from a TradingView indicator I rely on. The indicator is key to my trading, and I’d like to access and customize its Pine Script code for deeper analysis. If you have experience with TradingView’s structure and decompiling or reverse-engineering indicators, please get in touch—let's unlock this together
I have a complex indicator which is made by another coder before , but if i open a chart and run the indicator, then after some times i open new chart the same as before and run indicator on new chart again, the the recent signals on new chart is diffrent from the chart which was opened before!!! if anyone can solve it message me
Indicator Automater EA Required
50 - 100 USD
Hi Everyone, I am looking to hire a developer to create an Indicator Autometer EA for MetaTrader 4, utilizing two custom indicators: ARROW and MA TREND . The EA should be flowing parameter that I put manual. Include telling stop, break even. Cheek attach file
Help with a k-Nearest Neighbor algorithm (k-NN)
50 - 100 USD
Hi there, many thanks for taking the time out to read my request. my request seems simple and i've attempted building it myself and have compiled a complete coded file (with the aid of chat) however the coding doesn't want to place trades and after some heavy hours of searching and working on it leaves me reaching out here also. I am currently using a indicator on trading view which im aiming to perfectly make into a
I want someone to create a two moving average expert advisor for mt5 where by the lot size is according to the user, it closes the current position after the execution of the new opposite sell or buy cross over even if it is in loss or profit but after closing it then it opens another position according to the latest crossover. It should be for. Simple moving averages
プロジェクト情報
予算
30 - 50 USD
開発者用
27
- 45
USD
締め切り
最低 1 最高 3 日