Preciso converter robô de profitchart para mt5

Specifiche

quero converter esse codigo de profitchart para metatrader 5


     a estrategia é para mini indice: sempre que o preço cai 1.60% em relação a maxima do dia ele compra e sempre que sobre 1.60% em realação a minima ele vende 
alvo para compra é de 900 e stop de 250
alvo para venda é de 1800 e stop de 100 


input
  variaçao(1.60);
var
  numa,c,v,op,b               : integer;
  alvoxx,stopxx,max,min,varic : float;
  compra,venda                : boolean;
begin
  max := highD(0);
  min := lowD(0);
  varic := (variaçao / 100) + 1;
  //definindo as condições de compra e venda
  compra := (close < max / varic);
  venda := (close > min * varic);
  //fazendo o código da estratégia
  if (IsBought = false) and (iSSold = false) and (time < 1650) and (op = 0) then
    begin
      b:=0;
      numa := 0;
      if (compra) and (c = 0) then
        BuyAtMarket;
      if (venda) and (v = 0) then
        SellShortAtMarket;
    end;
  if (IsBought) then
    begin
      c := 1;
      v := 0;
      op := 1;
      numa := numa + 1;
      alvoxx := BuyPrice + 900;
      stopxx := BuyPrice - 250;
      if (close>buyprice+649) then b:=1;
      //alvo
      selltocoverLimit(alvoxx);
      //stop
      if (b=0) then
      selltocoverstop(stopxx,stopxx - 1000);
      if (b=1  ) then
      selltocoverstop(buyprice,buyprice - 1000);
    end;
  if (isSold = true) then
    begin
      c := 0;
      v := 1;
      op := 1;
      numa := numa + 1;
      alvoxx := SellPrice - 1800;
      stopxx := SellPrice + 100;
      //alvo
      buytocoverLimit(alvoxx);
      if (close<sellprice-649) then b:=1;
      //stop
      if (b = 0) then
        buytocoverstop(stopxx,stopxx + 1000);
      if (b = 1) then
        buytocoverstop(sellprice,sellprice + 1000);
    end;
  if (time > 1700) then
    begin
      c := 0;
      v := 0;
      op := 0;
      ClosePosition;
    end;
  plot(max);
  plot2(min);
end;

Con risposta

1
Sviluppatore 1
Valutazioni
(2)
Progetti
6
33%
Arbitraggio
0
In ritardo
2
33%
Gratuito
2
Sviluppatore 2
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
3
Sviluppatore 3
Valutazioni
(539)
Progetti
618
33%
Arbitraggio
35
37% / 49%
In ritardo
10
2%
Occupato
4
Sviluppatore 4
Valutazioni
(11)
Progetti
17
59%
Arbitraggio
2
0% / 100%
In ritardo
2
12%
Gratuito
5
Sviluppatore 5
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
0
In ritardo
0
Gratuito
6
Sviluppatore 6
Valutazioni
(294)
Progetti
469
39%
Arbitraggio
100
41% / 23%
In ritardo
77
16%
Caricato
Pubblicati: 2 codici
7
Sviluppatore 7
Valutazioni
(1)
Progetti
1
100%
Arbitraggio
1
0% / 100%
In ritardo
0
In elaborazione
8
Sviluppatore 8
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
9
Sviluppatore 9
Valutazioni
(3)
Progetti
3
67%
Arbitraggio
0
In ritardo
0
Gratuito

Informazioni sul progetto

Budget
30+ USD
Scadenze
da 1 a 7 giorno(i)