Questions from Beginners MQL5 MT5 MetaTrader 5 - page 941

 
Vladimir Karputov:

You have thrown step #3 out of the code.

Well, how do you solve the requote problem with this step? Well, he will write me a print from the 3rd check.

I still do not have an order. How to send an order 100%?

 
ilvic:

Well, how do you solve the requote problem with this step? So he writes me a print from the 3rd check.

I'm still left without an order. How to send a 100% order?

1. Give me your full code.

2. Are you running online or in a tester?

 
Vladimir Karputov:

1. Give your full code.

2. Are you running online or in a tester?

The code is secret. I'm running it online. No requotes in the tester. So I got a 100-point bounce, which is crazy.

Maybe there's a loop in this function. Let's say five tries?

 

Hello.

Can you please tell me why when optimizing an EA, the \Terminal\tester\logs folder accumulates huge log files of the following content:


2 00:00:02.326 2014.04.30 12:57:30 Tester: #104 deleted due expiration

2 00:00:02.852 2014.05.29 10:20:00 Tester: order #105, sell 0.10 EURUSD is opened at 1.35871

0 00:00:02.852 2014.05.29 10:22:30 Tester: stop loss #105 at 1.35910 (1.35876 / 1.35926)


And for some time they contain standard information:


0 09:56:26.793 Expert Ye$$ USDCAD,H1: loaded successfully

0 09:56:50.448 TestGenerator: spread set to 50

2 09:56:53.229 Ye$$: optimization started


All optimization deals will be written there from the beginning of the N-th pass.

 

Is there any way to upgrade this sell condition, so that a sale is made when the 26-period average Close(26) crosses down the average of СLose(40). Not using the MA handle, but calculating it right there. For example Cl1+Cl2...Cl26/26<.... Cl40/40

 if(!sell_exist && (!buy_exist || !_OnlyOneOpenedPos) && time_bar > LAST_SELL_BARTIME[ir]) {
         open = iOpen(symbol_name[ir],0,0); 
         close = iClose(symbol_name[ir],0,0); 
         high = iHigh(symbol_name[ir],0,0); 
         low = iLow(symbol_name[ir],0,0); 
         if(open>0.0) {
            if(high/low>1.0 && high/low<2 && close>open) {
               if(CheckMoneyForTrade(symbol_name[ir],get_lot(ir,_Lots),ORDER_TYPE_SELL)) 
                  trade.Sell(get_lot(ir,_Lots),symbol_name[ir],SymbolInfoDouble(symbol_name[ir],SYMBOL_BID),0,0,_Comment);
               }
            }
 
Sprut112:

Is there any way to upgrade this sell condition, so that a sale is made when the 26-period average Close(26) crosses down the average of СLose(40). Not using the MA handle, but calculating it right there. For example Cl1+Cl2...Cl26/26<.... Cl40/40

You can. If you use MovingAverages.mqh library. This will help you.
Торговые приложения для MetaTrader 5 на заказ
Торговые приложения для MetaTrader 5 на заказ
  • www.mql5.com
У робота не дописана одна строчка и есть логические ошибки в коде это все нужно исправить, и не криво а нормально, сам программист но искать ошибку времени нет. Поэтом требуется помощь хорошего исполнителя, оплата будет соответствующая. Платформа МТ4. Нужен скрипт позволяющий формировать  статистику в виде таблицы и графики отнескольких...
 
Sprut112:

Is there any way to upgrade this sell condition, so that a sale is made when the 26-period average Close(26) crosses down the average of СLose(40). Not using the MA handle, but calculating it right there. For example Cl1+Cl2...Cl26/26<.... Cl40/40

UseCopyRates.

The main thing is not to forget to put

ArraySetAsSeries(rates,true); 

- after this line in rates[0].*** will correspond to the right bar on the chart.

 
Vladimir Karputov:

UseCopyRates.

The main thing is not to forget to put

- after this line in rates[0].*** will correspond to the right bar on the chart.

One more question about this. It concerns the Wizard. If let's say I create by Macd. The symbols can be left blank if for all, but if I want a specific set, can I list them separated by commas in the external parameters window?
 
Sprut112:
Another question on the subject. Regarding the Wizard. If let's say I create a Macd. Symbols can be left out ***

The word Symbols is wrong here. Look carefully at the screenshot:

Step 3

Where do you see "Symbols" here?

 
Vladimir Karputov:

The word Symbols is wrong here. Look carefully at the screenshot:

Where do you see "Symbols" here?

Clearly yes, so, by default, for all
Reason: