Goldpo

MQL4 Experts

Specification

bonjour j'aimerais qu'on me converti mon script pinescript que j'ai coder sur tradingview sur mql4 

merci pour votre aide !!


//@version=5


EMA_1=input.int(defval=50, title="EMA1", minval=0, maxval=2000)

EMA_2=input.int(defval=50, title="EMA2", minval=0, maxval=2000)




//indicateur


strategy("Mon script",overlay=true)

EMA1 = ta.ema(close, EMA_1)

EMA2 = ta.ema(close, EMA_2)


plot(EMA1,"EMA1")

plot(EMA2,"EMA2")



//signaux


Buysignal = ta.crossover(EMA1,EMA2)

Closesignal = ta.crossunder(EMA1,EMA2) 


plotchar(Closesignal,char="c")


plotchar(Buysignal,char="b")


//Strategy


strategy.entry("buy",strategy.long,1, when = Buysignal) 


//TakeProfit

TradePris = strategy.position_size[0]> strategy.position_size[1]


Entryvalue = ta.valuewhen(TradePris, open, 0)


Tp = input.int(defval=50, title="TakeProfit", minval=0, maxval=2000)


T10 = Entryvalue * Tp

T11 = T10 / 100

T12 = Entryvalue + T11

plot(T12)


//StopLoss


Sl = input.int(defval=50, title="stoploss", minval=0, maxval=2000)


T5 = Entryvalue / 100*Sl

T6 = Entryvalue - T5

plot(T6)


strategy.entry("short",strategy.short, 1, when = Closesignal or close > T12 or close < T6 )


plot(close)


Responded

1
Developer 1
Rating
(284)
Projects
459
39%
Arbitration
95
43% / 18%
Overdue
73
16%
Working
Published: 2 codes
2
Developer 2
Rating
(23)
Projects
29
14%
Arbitration
3
0% / 67%
Overdue
3
10%
Working
3
Developer 3
Rating
(5)
Projects
6
17%
Arbitration
2
0% / 100%
Overdue
0
Free

Project information

Budget
30+ USD
VAT (20%): 6 USD
Total: 36 USD
For the developer
27 USD