[Archive!] WRITING A COUNTRY TOGETHER!!! - page 20

 

I realise I got stuck on page 19 after reading the first one, but let's get this straight:

1) the basis is an EA working on a breakdown

2) all other ideas that do not correspond to the breakdown are rejected?

3) Shouldn't we classify the strategies and then build 3-4 EAs?

4) I am ready to support them with ideas and code

5) excuse me - I have to read the previous 18 pages

 
no concrete suggestions at all so far... neither on breakdowns nor others... so far only specific from the author on multicurrency analysis (hedge)
 

Then the first suggestion from me:

let's define the possible ways of working (breakdown, non-breakdown, etc.). Geez, I've seen articles somewhere, so if anyone has any tips, I'd be grateful if someone would drop in a link.

 
I guess nobody cares about the strategy as long as there is a profit...
 
sllawa3 >> :
I guess nobody cares about the principle of the strategy as long as it is profitable...

With that kind of approach, it can be anything.

As far as I'm concerned, the main thing is coding backed up by competent theroia. Since the author has run out of enthusiasm, I suggest - let's do things the mature way?????

1) There is a strategy by Mr BookKeeper. For the sake of memory of the man, let's create an Expert Advisor based on it. You can find the strategy here http://uploadbox.com/files/73dd564596/

2) Let us not pay attention to its profitability yet - the process of implementation will tell us all about the bottlenecks, which can be a starting point for future projects.

3) I propose to create a new thread (I hope moderators won't mind) - Creating strategy 'Expert Advisor based on BookKeeper's strategy'.

 
caspermax >> :

Then the first sentence is from me:

Let's determine the possible ways of working (breakthrough, no breakthrough, etc.). Damn, I knew article somewhere, so if someone will tell me - I will be grateful, if someone will throw away a link.

If anyone hasn't bothered to read all 19 pages, I'll tell you briefly ;)

The original idea was indeed to break through the previous day's high/low. We just stupidly enter with a fixed stop and profit. In the long term this system works with the profit factor approximately equal to 1.0. I.e. it is losing as much profit as it is losing 50/50. That is why I suggest using additional tools to increase the profitability of the Expert Advisor using the testing period of 2009. Recall that initially there was no indicator, no oscillator, no trawl, no market exit rules, i.e. nothing...

This was followed by a couple of suggestions and as an option I decided to post my own multicurrency indicator too. I attached it to my Expert Advisor and got the results since 2000. (P.9).

This is why we forgot about the initial idea and started discussing the indicator))) and build our EA based on it. So, let's make a brief introduction:)

Will get back to the breakdown idea today though and post the expert. I'll be happy to discuss it together...

 
RomanS >> :

Initially there really was an idea for a breakdown of the previous day's high/low... But for some reason, they forgot about the original idea and started discussing the indicator itself ))))

I ' m still dealing with mine. But I agree about the indicator) There should be something as a trade filter...

 
ALex2008 >> :

I'm still sorting mine out... But about the indicator I'll join you) There should be something as a trade filter...


Yes, I check this thread from time to time...

It's interesting to see the final results, I see you have almost everything ready, but it's still a dense forest )))

 

It is the same Expert Advisor as on the first page, but it checks for the MACD divergence, i.e. if there is no divergence, we open in the direction of breakdown, if there is, it is exactly the opposite. Here is an example of the expert in the picture

At the same time stop loss is set 2 times less than take profit.

Here is the code

//+-----------------------------------------------------------------------+
//|                                                     Крокодил ГЕНА.mq4 |
//|                                                         Крокодил ГЕНА |
//+-----------------------------------------------------------------------+

  // Внешние переменные
  extern double TakeProfit = 1100; 
  extern double Lot        = 1;    
  extern string SYMBOL     = "EURUSD";
  
  // Глобальные переменные
  int LastTradeTime = 0;      // Время последней открытой сделки
  
  // Поехали... :)
  int start() 
  {  
     int Ticket;
  double BID,
         ASK,
         SL=0,
         TP=0;                                  
    bool Ans         = false,
         Open_Bay_1  = false,
         Open_Sell_1 = false,
         Open_Bay_2  = false,
         Open_Sell_2 = false;

  // Критерии открытия позиций
    RefreshRates();                                             
    BID = MarketInfo( SYMBOL,9);
    ASK = MarketInfo( SYMBOL,10);
    if ( BID > iHigh ( SYMBOL,PERIOD_D1,1))
      {
       if (iMACD( SYMBOL,15,12,26,9,0,0,0)>iMACD( SYMBOL,15,12,26,9,0,0,iHighest( SYMBOL,15,MODE_HIGH,96,1))) Open_Bay_1 = true;
       if (iMACD( SYMBOL,15,12,26,9,0,0,0)<iMACD( SYMBOL,15,12,26,9,0,0,iHighest( SYMBOL,15,MODE_HIGH,96,1))) Open_Sell_2 = true;
      }
    if ( BID < iLow ( SYMBOL,PERIOD_D1,1))
      {
       if (iMACD( SYMBOL,15,12,26,9,0,0,0)<iMACD( SYMBOL,15,12,26,9,0,0,iHighest( SYMBOL,15,MODE_HIGH,96,1))) Open_Sell_1 = true;
       if (iMACD( SYMBOL,15,12,26,9,0,0,0)>iMACD( SYMBOL,15,12,26,9,0,0,iHighest( SYMBOL,15,MODE_HIGH,96,1))) Open_Bay_2 = true;
      } 
        
  // Открытие позиций 1
      if ( Open_Bay_1 == true && OrdersTotal()==0 && TimeDay(TimeCurrent())!= LastTradeTime)                                           
        {      
         SL = iLow( SYMBOL,PERIOD_D1,0);
         TP = ASK + TakeProfit*Point;
         Ticket=OrderSend( SYMBOL,OP_BUY, Lot, ASK,20, SL, TP);         
         LastTradeTime=TimeDay(TimeCurrent()); // задаем время сделки, чтобы сегодня больше не торговать 
        }
     if ( Open_Sell_1 == true && OrdersTotal()==0 && TimeDay(TimeCurrent())!= LastTradeTime)                                             
        {      
         SL = iHigh ( SYMBOL,PERIOD_D1,0);
         TP = BID - TakeProfit*Point;
         Ticket = OrderSend( SYMBOL,OP_SELL, Lot, BID,20, SL, TP);         
         LastTradeTime=TimeDay(TimeCurrent());  // задаем время сделки, чтобы сегодня больше не торговать
        }
        
  // Открытие позиций 2
      if ( Open_Bay_2 == true && OrdersTotal()==0 && TimeDay(TimeCurrent())!= LastTradeTime)                                           
        {      
         SL = BID - TakeProfit/2*Point; 
         TP = ASK + TakeProfit*Point;
         Ticket=OrderSend( SYMBOL,OP_BUY, Lot, ASK,20, SL, TP);         
         LastTradeTime=TimeDay(TimeCurrent()); 
        }
     if ( Open_Sell_2 == true && OrdersTotal()==0 && TimeDay(TimeCurrent())!= LastTradeTime)                                             
        {      
         SL = BID + TakeProfit/2*Point;                                            
         TP = BID - TakeProfit*Point;
         Ticket = OrderSend( SYMBOL,OP_SELL, Lot, BID,20, SL, TP);         
         LastTradeTime=TimeDay(TimeCurrent());   
        } 
   // Закрытие позиций
     for(int i=0; i<=OrdersTotal(); i++)   
      {  
       if (OrderSelect( i, SELECT_BY_POS)==true)  
         {                                        
          if (OrderSymbol() != SYMBOL) continue;
          if (OrderType()==0)
            {
             if (OrderProfit()>0 && TimeDay(TimeCurrent())!= LastTradeTime)
             Ans = OrderClose(OrderTicket(),OrderLots(), ASK,20);
            }
          if (OrderType()==1)
            {
            if (OrderProfit()>0 && TimeDay(TimeCurrent())!= LastTradeTime)
            Ans = OrderClose(OrderTicket(),OrderLots(), BID,20);
            }
         } 
      }        
   return;       
  }

If take profit is not reached within a day, but there is some profit on position, we close position.

This is from 01.01.2009 till today.

By the way, the definition of divergence is simple and even ridiculous, but it works somehow. Does anybody have any idea of a better definition?

 
the breakdown principle was tried by me about a year ago in many different variations... i can confidently say it is not viable... as for the lack of indicators, i can also say that in any case, the price is already an indicator... and all the others are derivatives of it... with different degrees of averaging... delays, etc... I propose to write a multicurrency system on a simple and effective principle ... entry when 2 indicators are running too high ... stochastic and Vp ... and at the same time on multiple timeframes ( for example m1 and 5 and m15 or 30)
Reason: