learn how to earn money villagers [Episode 2] ! - page 24

 

I've been reading a bit about the T101 strategy, is there any way to bail out Elan on this?)

I don't know if links are allowed here, but here's the Russian-language discussion _http://forexsystems.ru/ruchnye-torgovye-strategii-i-taktiki/11021-simple-trading-method-trader101.html

Although some people say it is enough to look at GBPUSD and USDJPY and if they both go up GBPJPY is to buy, if both go down GBPJPY should be sold.) I have already started to tinker with Ilan's code and introduce different filters and try to filter entries with GBPbucks and Baxen on GBP, what do you think about it ? :)

It's a pity it's impossible to check it in the tester :(

 
PapaYozh:


sometimes I feel like I'm dreaming...


...and dreaming about "The Tale of the Three"... :-)
 
Roman.:
...and dreaming of "The Tale of the Three"... :-)
You make it clear, half the forum won't know what it's about.
 
granit77:
You explain, here half of the forum will not understand what we are talking about.

I love it when a man has time to do everything! - I wonder if I'm the only one who gets the feeling that I'm readingThe Tale of Three" - is it Gaius Julius Caesar? :-)

If not then pleasant dreams in the form of competent rudders of locos - probably he is not ready yet... :-) for aerobatics...

 
olyakish:

That's it, settle down.

Here is the chart of the EA in MT5 for EURUSD, GBPUSD, EURGBP (simultaneously) since 1999 with 0,1 lot without change


Can we see the code for MT5 ?
 
Roman.:


If not, pleasant dreams in the form of competent loco rudders - apparently he's not ready yet... :-) for aerobatics...

There is no aerobatics there, just masturbation.
 
granit77:
You explain, half of the forum won't understand what you're talking about.


There was Yusuf's spin:

yosuf:
Alas, I cannot tell the EA to work better, it chooses its own mode of operation and indeed it seems to us that it does not work quite optimally, but looking at the outcome we have to forgive it this wastefulness.

I was reminded of the heuristic machine from The Tale of the Three.
 

Results of the second day at UPU:

+ opened a trade for +$18.

Next time I will report on this EA in a week.

 
Heroix:

Results of the second day at UPU:

+ opened a trade for +$18.

Next time I will report on this EA in a week.

Great)
 
BeerGod:
Can I see the code for MT5 ?
//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2010, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#include <Trade\Trade.mqh>            
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
class CExpMA20
  {
public:
                     CExpMA20(void);
   void              Init(string InSymb="",double InLot=0.1,int InMA_per=20,int Inminute_start=15);
   void              CheckAndTrade();
   void              closePos(int type);
                    ~CExpMA20(void);
private:
   double            lot;
   string            Symb;
   int               period_ma;
   CTrade            trade;                         // Используем класс CTrade
   int               h_MA;
   int               minute_start;
   datetime          old_time;
   //CPositionInfo     pos_info;
  };
//+------------------------------------------------------------------+
CExpMA20::CExpMA20(void){return;}
CExpMA20::~CExpMA20(void){return;}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void CExpMA20::Init(string InSymb="",double InLot=0.100000,int InMA_per=20,int Inminute_start=15)
  {
   lot=InLot;
   Symb=InSymb;
   period_ma=InMA_per;
   minute_start=Inminute_start;
   h_MA=iMA(Symb,PERIOD_CURRENT,period_ma,0,MODE_SMA,PRICE_CLOSE);
  }
//+------------------------------------------------------------------+
void CExpMA20::CheckAndTrade(void)
  {
   double close[2];
   datetime time[1];
   double MA[2];
   double Ask = SymbolInfoDouble(Symb,SYMBOL_ASK); // лучшее предложение на покупку
   double Bid = SymbolInfoDouble(Symb,SYMBOL_BID); // лучшее предложение на продажу
   CopyClose(Symb,PERIOD_CURRENT,0,2,close);
   CopyTime(Symb,PERIOD_CURRENT,0,1,time);
   datetime TimeBar_t=(TimeCurrent()-time[0])/60;
   CopyBuffer(h_MA,0,0,2,MA);
   Comment(close[0]," ",close[1]," \n",MA[0]," ",MA[1],"\n",lot);
   bool Buy_Condition=(Bid<MA[1] && MA[1]<MA[0] && Bid<close[0] && TimeBar_t==minute_start && old_time!=time[0]);
   bool Sell_Condition=(Bid>MA[1] && MA[1]>MA[0] && Bid>close[0] && TimeBar_t==minute_start && old_time!=time[0]);
   if(Buy_Condition && PositionSelect(Symb) && PositionGetInteger(POSITION_TYPE)==(ENUM_POSITION_TYPE)POSITION_TYPE_SELL)
     {
      trade.PositionOpen(Symb,
                         ORDER_TYPE_BUY,// ордер на покупку
                         lot+lot,// количество лотов для торговли
                         Ask,// последняя цена ask 
                         0.0,// Stop Loss
                         0.0,// Take Profit 
                         "");
      old_time=time[0];
     }
   if(Buy_Condition && !PositionSelect(Symb))
     {
      trade.PositionOpen(Symb,
                         ORDER_TYPE_BUY,// ордер на покупку
                         lot,// количество лотов для торговли
                         Ask,// последняя цена ask 
                         0.0,// Stop Loss
                         0.0,// Take Profit 
                         "");
      old_time=time[0];
     }
   if(Sell_Condition && PositionSelect(Symb) && PositionGetInteger(POSITION_TYPE)==(ENUM_POSITION_TYPE)POSITION_TYPE_BUY)
     {
      trade.PositionOpen(Symb,
                         ORDER_TYPE_SELL,// ордер на продажу
                         lot+lot,// количество лотов для торговли
                         Bid,// последняя цена Bid 
                         0.0,// Stop Loss
                         0.0,// Take Profit 
                         "");
      old_time=time[0];
     }
   if(Sell_Condition && !PositionSelect(Symb))
     {
      trade.PositionOpen(Symb,
                         ORDER_TYPE_SELL,// ордер на продажу
                         lot,// количество лотов для торговли
                         Bid,// последняя цена Bid 
                         0.0,// Stop Loss
                         0.0,// Take Profit 
                         "");
      old_time=time[0];
     }
  }
//+------------------------------------------------------------------+

input double Lots=0.1;                      // количество лотов для торговли  
CExpMA20 EURUSD_MA_20;
//CExpMA20 GBPUSD_MA_20;
//CExpMA20 EURGBP_MA_20;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   EURUSD_MA_20.Init("EURUSD",0.1,20);
   //GBPUSD_MA_20.Init("GBPUSD",0.1,20);
   //EURGBP_MA_20.Init("GBPUSD",0.1,20);
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnTick()
  {
   EURUSD_MA_20.CheckAndTrade();
   //GBPUSD_MA_20.CheckAndTrade();
   //EURGBP_MA_20.CheckAndTrade();
   return;
  }
//+------------------------------------------------------------------+
Reason: