작업 종료됨
실행 시간 3 시간
고객의 피드백
Amazing Guy! It just took 2 hours for him to complete the job! Indicator works great!
피고용인의 피드백
Great customer. I hope we will have more cooperation
명시
Hi Guys, I want to translate this indicator's code:
Best if the code would run as bar closes/opens new one.
The "barcolor" is not needed.
Also, the "plotshape" part is not needed, when the "Sell" or "Buy" event appears I just want it to add a vertical line (or whatever with green or red color) and Print in the console "Starting LONG" / "STARTING SHORT".
I will want to build EA on top of this so I will need the source code.
Please run this part of code inside TradingView and see how it works.
While rewriting this code please add comments to each function/line that represents some functionality.
Any questions - just ask.
//@version=4 study(title="=Testing", overlay = true) // Inputs a = input(1, title = "Key Vaule. 'Sensitivity'") // Please rename it "SENSITIVITY" c = input(2, title = "ATR Period") // Please rename to "ATR_PERIOD" xATR = atr(c) nLoss = a * xATR src = close xATRTrailingStop = 0.0 xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss), iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss), iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss))) pos = 0 pos := iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1, iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0))) xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue ema = ema(src,1) above = crossover(ema, xATRTrailingStop) below = crossover(xATRTrailingStop, ema) buy = src > xATRTrailingStop and above sell = src < xATRTrailingStop and below barbuy = src > xATRTrailingStop barsell = src < xATRTrailingStop plotshape(buy, title = "Buy", text = 'Buy', style = shape.labelup, location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.tiny) plotshape(sell, title = "Sell", text = 'Sell', style = shape.labeldown, location = location.abovebar, color= color.red, textcolor = color.white, transp = 0, size = size.tiny) barcolor(barbuy ? color.green : na) barcolor(barsell ? color.red : na) alertcondition(buy, "Long", "Long") alertcondition(sell, "Short", "Short")to the MQL5 code.
Best if the code would run as bar closes/opens new one.
The "barcolor" is not needed.
Also, the "plotshape" part is not needed, when the "Sell" or "Buy" event appears I just want it to add a vertical line (or whatever with green or red color) and Print in the console "Starting LONG" / "STARTING SHORT".
I will want to build EA on top of this so I will need the source code.
Please run this part of code inside TradingView and see how it works.
While rewriting this code please add comments to each function/line that represents some functionality.
Any questions - just ask.
응답함
1
등급
프로젝트
125
23%
중재
12
0%
/
75%
기한 초과
22
18%
무료
2
등급
프로젝트
543
75%
중재
9
44%
/
0%
기한 초과
24
4%
무료
프로젝트 정보
예산
30+ USD