i try make this, but evertime count please i need so much learn this i will go crazy
if(close[i+5]>Buffer1[i]&&i>1){nVit=nVit+1;} else{nDer=nDer+1;} if(close[i+5]<Buffer2[i]&&i>1){nVit=nVit+1;} else{nDer=nDer+1;} ObjectCreate("Nome", OBJ_LABEL,0,0,0);// Creating obj. ObjectSet("Nome", OBJPROP_CORNER, 0); // Reference corner ObjectSet("Nome", OBJPROP_XDISTANCE, 10);// X coordinate ObjectSet("Nome", OBJPROP_YDISTANCE, 15);// Y coordinate ObjectSetText("Nome",Nome_do_indicador,10,"Arial",clrAliceBlue); ObjectCreate("Vitórias", OBJ_LABEL,0,0,0);// Creating obj. ObjectSet("Vitórias", OBJPROP_CORNER, 0); // Reference corner ObjectSet("Vitórias", OBJPROP_XDISTANCE, 10);// X coordinate ObjectSet("Vitórias", OBJPROP_YDISTANCE, 30);// Y coordinate ObjectSetText("Vitórias","Vitórias:"+nVit,10,"Arial",clrAliceBlue); ObjectCreate("Derrotas", OBJ_LABEL,0,0,0);// Creating obj. ObjectSet("Derrotas", OBJPROP_CORNER, 0); // Reference corner ObjectSet("Derrotas", OBJPROP_XDISTANCE, 10);// X coordinate ObjectSet("Derrotas", OBJPROP_YDISTANCE, 45);// Y coordinate ObjectSetText("Derrotas","Derrotas:"+nDer,10,"Arial",clrAliceBlue); ObjectCreate("wR", OBJ_LABEL,0,0,0);// Creating obj. ObjectSet("wR", OBJPROP_CORNER, 0); // Reference corner ObjectSet("wR", OBJPROP_XDISTANCE, 10);// X coordinate ObjectSet("wR", OBJPROP_YDISTANCE, 60);// Y coordinate ObjectSetText("wR","WinRate:"+MathRound(nWr)+"%",10,"Arial",clrAliceBlue);
![](https://c.mql5.com/3/347/2803012729201__1.png)
I tried your indicator on my machine and it didn't load.
If you don't get the help you had hoped for here, you can hire somebody. People don't work for free you know.
Tentei seu indicador na minha máquina e não carregou.
Se você não conseguir a ajuda que esperava aqui, pode contratar alguém. As pessoas não trabalham de graça, você sabe.
I know, I am not demanding anything from anyone, just asking for help because I believe that there is only one detail missing in the code, in case I do not find any charitable soul to clear this doubt, I will take my measures. thanks for instructing me
It is not clear what you are trying to do, maybe because English is not your first language.
You may find help by posting in the Portuguese forum.
Não está claro o que você está tentando fazer, talvez porque o inglês não seja sua primeira língua.
Você pode encontrar ajuda postando no fórum português.
it would just be an accountant with the following logic
for call (buffer1) if (the closing value of the fifth candle after a signal is greater than the closing value of this signal) adds 1 victory on the counter;
else (sum 1 loss)
for put (buffer2) vice versa
this for all arrows (indicator buffers)
my try
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) {... for (int i = limit-1; i>=0; i--) if (i >= MathMin(50000-1, rates_total-1-50)) continue; ... static double nVit = 1.00; static double nDer = 1.00; if (rates_total == prev_calculated) { if(Buffer1[6]>0 && Buffer1[6]!=EMPTY_VALUE && Close[1]>Buffer1[6]) { nVit=nVit+1; } else { nDer=nDer+1; } if(Buffer2[6]>0 && Buffer2[6]!=EMPTY_VALUE && Close[1]<Buffer2[6]) { nVit=nVit+1; } else { nDer=nDer+1; } } ObjectCreate("Nome", OBJ_LABEL,0,0,0);// Creating obj. ObjectSet("Nome", OBJPROP_CORNER, 0); // Reference corner ObjectSet("Nome", OBJPROP_XDISTANCE, 10);// X coordinate ObjectSet("Nome", OBJPROP_YDISTANCE, 15);// Y coordinate ObjectSetText("Nome",Nome_do_indicador,10,"Arial",clrAliceBlue); ObjectCreate("Vitórias", OBJ_LABEL,0,0,0);// Creating obj. ObjectSet("Vitórias", OBJPROP_CORNER, 0); // Reference corner ObjectSet("Vitórias", OBJPROP_XDISTANCE, 10);// X coordinate ObjectSet("Vitórias", OBJPROP_YDISTANCE, 30);// Y coordinate ObjectSetText("Vitórias","Vitórias:"+(nVit-1),10,"Arial",clrAliceBlue); ObjectCreate("Derrotas", OBJ_LABEL,0,0,0);// Creating obj. ObjectSet("Derrotas", OBJPROP_CORNER, 0); // Reference corner ObjectSet("Derrotas", OBJPROP_XDISTANCE, 10);// X coordinate ObjectSet("Derrotas", OBJPROP_YDISTANCE, 45);// Y coordinate ObjectSetText("Derrotas","Derrotas:"+(nDer-1),10,"Arial",clrAliceBlue); ObjectCreate("wR", OBJ_LABEL,0,0,0);// Creating obj. ObjectSet("wR", OBJPROP_CORNER, 0); // Reference corner ObjectSet("wR", OBJPROP_XDISTANCE, 10);// X coordinate ObjectSet("wR", OBJPROP_YDISTANCE, 60);// Y coordinate ObjectSetText("wR","WinRate:"+NormalizeDouble(((nVit-1)/(nVit+nDer-2)*100),Digits)+"%",10,"Arial",clrAliceBlue); } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+
my result :(
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Good Afternoon.
How can i insert a backtester of the buffers like the image on mt4( for example: if 5minutes after the buffer 1 is greater than start count 1 win else count 1 loss)?