I will write an advisor free of charge - page 38

 
Romal001:
And how do you envisage this control? Just describe it in detail.
 

Hello all! I can't cope with one problem... Please help!!! There was an Expert Advisor with Martingale (2SS), I reworked almost everything - now it also opens by Trend. There is a block counting accumulated profit of separately closed orders and was reset to "0" - when the whole series was closed, and in particular the 1st open order. Now this 1st order may close at any time... And the accumulated profit is nullified. TASK: Hold this flag (series openings) until ALL orders are closed after this flag has "appeared". In the source code, it looked like this:

  if(OrderSelect(TicketB[totb-1],SELECT_BY_TICKET)) TimeB=OrderOpenTime();
  if(OrderSelect(TicketS[tots-1],SELECT_BY_TICKET)) TimeS=OrderOpenTime();
.......//...........//...........//............//............//........
         if(!OrderSelect(k,SELECT_BY_POS,MODE_HISTORY)) break;
         if((OrderOpenTime()<TimeB || totb==0) && (OrderOpenTime()<TimeS || tots==0)) break;
         if(OrderSymbol()==Symbol())
           {
            if((OrderMagicNumber()==magicbuy || OrderMagicNumber()==magicbuyTrEnd) && OrderType()==OP_BUY  && OrderOpenTime()>TimeB) ProfitBuyN  += OrderProfit()+OrderSwap()+OrderCommission();
            if((OrderMagicNumber()==magicsell || OrderMagicNumber()==magicsellTrEnd) && OrderType()==OP_SELL && OrderOpenTime()>TimeS) ProfitSellN += OrderProfit()+OrderSwap()+OrderCommission();
           }

Thank you in advance!

 

GOOD DAY!

BELIEVE IT OR NOT, I HAVE MANAGED TO CREATE A MATHEMATICAL MODEL FOR WIN-WIN TRADING. THIS IS NOT ABOUT INDICATORS AND/OR OTHER TOOLS. THE BASIS OF THE METHOD: ANY ENTRY POINT LEADS TO A PROFIT, PROVIDED THERE IS MINIMAL VOLATILITY IN THE MARKET. THIS PROBLEM HAS A UNIQUE SOLUTION. THE METHODOLOGY IS DIFFICULT TO IMPLEMENT IN THE MANUAL, IT REQUIRES A ROBOT. LOOKING FOR A FIN. COMPANY WORKING IN THE FOREX MARKET OR A FREELANCER WITH EXTENSIVE EXPERIENCE WHO IS WILLING TO FOCUS ON THE PROJECT AND WRITE AND DEBUG THE CONTENT. RESIDENCE - PREFERABLY WEST EUROPE. ABOUT ME: I GOT A GOOD UNIVERSITY DEGREE IN MATHEMATICAL PHYSICS. WORK IN THE FIELD OF NEW TECHNOLOGIES TO CREATE NEW NATURAL MATERIALS OF DE LUXE CLASS. I WISH EVERYONE GREAT PROFITS. ANDRE.

 
ANGE17:

ABOUT ME: **** I WORK IN THE FIELD OF NEW TECHNOLOGIES THAT ENABLE THE CREATION OF NEW NATURAL MATERIALS IN THE DE LUXE CLASS. I WISH YOU ALL A LOT OF PROFITS. ANDRE.

Do you work for Herbalife?
 

ANGE17:

... AT THE HEART OF THE METHOD: ANY ENTRY POINT LEADS TO A PROFIT, PROVIDED THERE IS MINIMAL VOLATILITY IN THE MARKET. ...

Well, yes, if you open in the right direction.
 
Oksana Berenko:
Well, yes, if you open up in the right direction.
And who is stopping you from opening up in the right direction...?
 

I have a strategy. Here is its description:

Timeframe: any

The tools I use:

Bollinger bands: period 20

divergences 2

applied to close

ADX: period 14

applied to close

there is a level 25

Buy signal: during a flat (when ADX level is below 25), wait for the price to close at the bottom Bollinger Band ( parameter o defines open point of order, distance from middle Bollinger Band to bottom Bollinger Band is defined as 100 %, 0 % is point at bottom Bollinger Band, 10 % is higher, etc.), then wait for the price increase on the confirmation candle. We open buy. Stop Loss is set in pips in the settings. order closing depends on the options in the EA, options parameters will be explained later. the order is closed with the parameter n when it touches the middle band of bollinger (parametern is set in percent, defines what part of volume is closed, in lots this value is rounded down, 0% means that nothing is closed) . Stop Loss is set at the opening price of the order, then the order is fully closed with the parameter f (the distance from the middle bollinger band to the upper band is 100 per cent, the parameter f defined in percents sets the point where the order will be closed if the price reaches it, 0 per cent is the point on the upper bollinger band below 10 per cent, etc.) )/

Sell order: during a flat (when ADX is below 25), wait for the price to close at the top Bollinger Band ( o specifies the entry point of the order, the distance from the average Bollinger Band to the top band is 100 per cent, 0 per cent is at the top Bollinger Band, 10 per cent is below etc.), then wait for the confirmation candle to close moving towards the lower price. We open the sale. Stop Loss is set in pips in the settings .The order closing depends on the options in the EA, options parameters will be explained later .The order is closed with the parameter n when it touches the middle bollinger band. (parameter n is set in percents, it defines what part of volume is being closed, in lots this value is rounded down, it means that nothing is being closed).Stop Loss is set at opening price, further the order is being closed completely with parameter f. (the distance from the middle Bollinger Band to the bottom band is 100 %, the parameter f defined as a percentage defines the point where the order will be closed if the price reaches it, 0 % point at the bottom Bollinger Band, 10 % higher, etc.)

Options :

Stop Losses can be set in Expert Advisor options or none at all. There are two types of stop losses: regular (written in options "stop loss") and stop loss at opening price of order (written "stop loss full way").

I have tested the strategy manually on the history. The results are good , in a month brings an average of 12000-15000 pips(in MT4 terminal)

Result May-September 2015

EURUSD USDCHF GPBUSD USDJPY AUDUSD USDCAD sum
SEP 2544 3396 1504 4800 535 1837 14616
AUG 2075 0 4309 948 1537 4158 13027
Jul 3589 3395 2334 329 3991 0 13638
Jun 2224 3706 2215 990 5291 1957 16383
may 2201 -437 0 0 639 1505 3908

If you put a stoploss of 1000 pips (there were 3 cases during the whole testing period)

EURUSD USDCHF GPBUSD USDJPY AUDUSD USDCAD sum
SEP 2544 3396 1504 4800 535 1837 14616
AUG 2075 0 2503 948 1537 4158 11221
Jul 3589 3395 2334 -1000 3991 0 123309
Jun 2224 3706 1279 990 5291 1957 15447
may 2201 -437 0 0 639 1505 3908
 

Who will write a fairly simple EA. The EA is based on candlestick analysis. There will be several parameters that can be picked up to work well in the course of testing.

In manual mode I trade on this system profitability 92% .

 

How to combine two identical EAs into one in the easiest way possible?

In the code

 
Sergey Baboshin:

How to combine two identical EAs into one in the easiest way possible?

In the code

You were banned, weren't you?
Reason: