martingale in a probabilistic controlled environment

 

I'm looking for a programmer to code my idea developed after a careful analysis of pure martingale , EA  downloadable

from codebase mq4.

This EA generates random orders with stop loss and take profit.

It 'a martingale without multiple orders that charges in the event of loss in part on

lot multiplier, in part on the distance multiplier.

Under random as you well know, even though the probability of having n consecutive losses decrease with increasing n, operating in scalping with SL and TP = 5

the number of orders is high and occurs too frequently to achieve the

closure of the account.

My idea is to generate orders through the stochastic to introduce the system in a more favorable probability of the case.

All the details (and there are many) to those who participate ...


I am attaching a modified version of the EA.


I separated SL and TP and its distance multiplier


K and D are limits to the loss and gain latent,they close the order and reset the martingale.They doesn't calculate the loss since the peak reached!


Have impossible goals is the basis of success!

Files:
 
emiliano:

I'm looking for a programmer to code my idea developed after a careful analysis of pure martingale , EA  downloadable

Take your pick: MT4 & MT5 coders 
 
emiliano:I am attaching a modified version of the EA.
extern string  separator3              = "------ Trading Days ------";
extern bool    Monday                  = true;
extern bool    Tuesday                 = true;
extern bool    Wednesday               = true;
extern bool    Thursday                = true;
extern bool    Friday                  = true;
extern bool    Saturday                = true;
extern bool    Sunday                  = true;
  1. You can't use the tester to optimize bool's. Can those to int (0=false, 1=true) and you can.
  2. You can use a bit mask instead to minimize code and optimizer options
    extern int      Trade.DOW.Mask                  = 63;       // Sun=0, Fri=6
                                #define DAYS_MASK_MAX   0x3F    // 1<<6-1=63. Su-Fr
    :
        int DOW = TimeDayOfWeek(now.utc - TODz - useYesterday),
            DayMask = 1 << DOW; // #define DAYS_MASK_MAX    0x3F// 1<<6-1=63. (S-F)
        //extern int      Trade.DOW.Mask        =  55;      // Not Wed
        if ((Trade.DOW.Mask & DayMask) == 0){
            CallAgainOn(now.srv+(HR2400-TODz)/2,"dow"); return;
    
    Part of my code
Reason: