And let's make a "cartoon" out of it (multicurrency) - page 10

 
Vinin >> :

Take a look, think about how best to use it. And you can always help.

>> No... >>) Well, if it's going to work better than the source code, then of course you can try.) Will it be an improvement?)

 
ALex2008 писал(а) >>

Nah... Well, if it's supposed to produce a better result than the source code, then of course you can try)) Would it be an improvement?)

If you know. It all depends on logic.

If you need, then the functions that allow you to trade on a given day of the week, the hour of the day, I can lay out. Can make a similar function for the month.

 
Vinin >> :

If only one knew. It all depends on the logic.

If you need, the functions that allow trading on a given day of the week, hour of the day, I can lay out. You can make a similar function for month.

It's understandable that you can do that...) Except that it's harder to confirm such a correlation (from day, week and month)... All assure me that testing is not an indicator... It turns out that in order to find out this dependence we need a very long test on a demo, and I will try to do it...

 
ALex2008 писал(а) >>

It's understandable that you can do that...) Except that it's harder to confirm such a correlation (from day, week and month)... Everyone assures me that testing is not an indicator... It turns out that in order to find out such dependence one needs a very long test on demo.

Especially since it may not exist. Or it may have been there and disappear. It may be so, too. Or it may be different. It has slipped and its frequency of occurrence is increasing. No one can tell for now.

First, we need to compare the operation of different symbols.

I was making such an Expert Advisor. I found out that there was an optimal hour for work. But it was not always confirmed in the test. But there is a correlation.

 
Vinin >> :

And for a start, you need to compare the performance of different instruments.

Yeah right now I'm trying it on 12 pairs...

I was making a similar Expert Advisor. I got that there was an optimal hour for work. But it wasn't always confirmed during the test. But there is a correlation.

That's a thought that's been occurring to me... I have seen the code somewhere... nothing complicated... But then again, one has to determine the time for Expert Advisor to trade, or analyze its work using demo and look for dependencies (hour, day, week, month).

 
ALex2008 писал(а) >>

Yes, I'm trying 12 pairs right now...

It's a thought that's been crossing my mind... I have seen the code somewhere - nothing complicated... But then again, one has to determine the time for Expert Advisor trading, or analyze its work using demo programs and look for dependencies (hour, day, week, month).

Look at this Expert Advisor

Files:
 

Found one flaw... When placing pending orders a stop is not used, because it is calculated when a pending order triggers... When I was testing a demo, the connection was lost a couple of times - because of a Service Provider or a power outage... The positions were opening by themselves without the help of the EA and therefore without any stops (I got big losses, which is not good...)

I added the variable SLmax to the order setting block.

//-------Поиск входа для установки ордеров, удаление старых ордеров и установка новых
void UpTrend(){
     if((iOpen(NULL,PERIOD_H4,1) - iClose(NULL,PERIOD_H4,1) <= 0) &&
        (iOpen(NULL,PERIOD_H4,2) - iClose(NULL,PERIOD_H4,2) > 0)){
         Enter=iHigh(NULL,PERIOD_H4,1)+(Ask-Bid)+10*Point;
         SLmax=iLow(NULL,PERIOD_H4,1)-10*Point;
         if(IsTradeAllowed()){
            DellAllOrders();
            if( Enter-Ask> StopLevel-0.5*Point){
               OrderSend(Symbol(), OP_BUYSTOP, Lot, Enter, 0, SLmax, Enter+ Profit, 0, 0,0, Green);}
         else Sleep(1000);
         }
      }
  }
 
ALex2008 писал(а) >>

Found one flaw... When placing pending orders a stop is not used, because it is calculated when a pending order triggers... When I was testing the demo, the connection was lost a couple of times, then due to ISP or electricity failure ... The positions were opened without the participation of the EA and therefore without any stops ( I got big losses, which is not good ...)

Does it have something to do with mine or yours?

 
Vinin >> :

Does that apply to mine or your councillor's?

>> Yeah, mine so far... >>) I want to analyse his trades... and then go to time dependency...

 

Added a function to switch to a BU

//-------Вычисление бу и установка
void SetBU(){
      if( Type==0){
         EnterBU= Enter+ BUenter;
         StopLossBU= Enter+ BUstop;
         RefreshRates();
         if(Bid>= EnterBU)OrderModify(OrderTicket(),OrderOpenPrice(), StopLossBU,OrderTakeProfit(),0,Red);
      }
      if( Type==1){
         EnterBU= Enter- BUenter;
         StopLossBU= Enter- BUstop;
         RefreshRates();
         if(Ask<= EnterBU)OrderModify(OrderTicket(),OrderOpenPrice(), StopLossBU,OrderTakeProfit(),0,Red);
      }
}
Reason: