Script to test manually my indicators historical in strategy tester

MQL4 Experts Scripts

Spécifications

Hi everyone,


I want to manually test and analyze my indicators with the "Strategy tester".
It may be similar to the LFH Trading simulator. (Link: http://www.forexfactory.com/showthread.php?t=70742)

I have already tried several simulators. Unfortunately, I found no one who does what I want.

I need an EA (like LFH) and two scripts (long and short) that trigger a market order and simultaneously show two lines representing the stop and the target.
By positioning the stop, the Lot Size is calculated. The target and the stop must always be displaceable or customizable. Simply by moving the lines up or down. On the left of the target line, the risk/reward ratio should be displaced (e.g. 3.6). If I move the target, the display of the risk/reward ratio have to be adjusted or updated.

What variables should be set in the EA.
1. Risk in Percent
2. Target sell 50% or 100% of the position
3. Color Target
4. Color Stop

The lot size is calculated by the difference between the open of the next bar with the distance to the stop and the available capital.

Calculation Lot size:
Buy Example:
1.2500 = Open next bar, 1.2450 stop line, $ 10.000 account, risk 2%


Maximum position size =
  ((10,000 $ * 2% stop loss) / 50 pips SL) / ((100,000 / 1.25) * 0.0001) = 0.5 Lot

Specific number formula:
((10000 * 0.02) / 50) / ((100,000 / 1.25) * 0.0001) = 0.5 Lot
I hope I have this right.


Function next bar in the EA:
I do not care what happens in the next bar. Therefore, I need an implementation of this function is to go to the close of the bar and then the startegietester goes into pause mode. I click play again and it goes back to the close of the bar.
Example script with the problem here is the 14400. I have always adjust the variable if I go to a different period. for example from 4 hours to 5 minutes. This should take into account the new script.
// Break programs
    pausetime = TimeToStr (Time [0], TIME_DATE | TIME_MINUTES);
    Alert (pause time);
    if (pausetime> = pausetimenew)
      {
       Comment ("Next Stop" + pausetimenew);
       keybd_event (19,0,0,0);
       Sleep (1);
       keybd_event (19,0,2,0);
       pausetimenew = TimeToStr (Time [0] + 14400, TIME_DATE | TIME_MINUTES);
       // Note seconds adjust as required
      }

If you have any questions, just post here.

Répondu

1
Développeur 1
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
2
Développeur 2
Évaluation
(128)
Projets
236
65%
Arbitrage
30
37% / 23%
En retard
49
21%
Gratuit
3
Développeur 3
Évaluation
(219)
Projets
370
42%
Arbitrage
145
17% / 41%
En retard
124
34%
Gratuit
Publié : 38 codes
4
Développeur 4
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
5
Développeur 5
Évaluation
(64)
Projets
144
46%
Arbitrage
19
42% / 16%
En retard
32
22%
Gratuit

Informations sur le projet

Budget
20 - 100 USD
Délais
de 1 à 5 jour(s)