Translate code PRT in MQL4

MQL4 Other Converting

Specification

I have a code in prorealtime language and I want to code it in MQL4.

I really want to change "size of minimum position" (0.1 instead of 1)

EXEMPLE of prorealtime code: 

CapitalInit = 10000 // Capital initial (pour le réinvestissement des gains)

REINV = 0 // 0 = sans réinvestir / 1 = réinvestir les gains

NCONTRATS = 10 // nombre par défaut de minicontrats MAXI // l'algorithme diminue la taille de certaines positions // Bien vérifier le drawdown

IF REINV = 0 THEN

n = NCONTRATS

ELSIF REINV = 1 THEN

capital = CapitalInit + strategyprofit

n = (capital / CapitalInit)*NCONTRATS

ENDIF IF n < 1 THEN

n=1 // taille minimale par position

ENDIF n = round(n) // nombre entier


Responded

1
Developer 1
Rating
(258)
Projects
265
29%
Arbitration
0
Overdue
3
1%
Free
Published: 2 codes
2
Developer 2
Rating
(3)
Projects
3
0%
Arbitration
1
0% / 100%
Overdue
0
Free

Project information

Budget
30+ USD