Questions from a "dummy" - page 74

 
sergey1294:
More likely to get the maximum bar and add to it the spread on that bar

Thinking it won't be right as the spread in MT 5 tester changes.

 
abeiks:

Thinking it wouldn't be right as the spread in MT 5 tester changes.

inside the minute bar the spread does not change
 
sergey1294:
Inside the minute bar the spread does not change

I see, I didn't know.

Then already MT 5 tester is not such a 'candy' for scalpers. :)

How does the tester determine the spread within a minute bar? Or where to read such nuances?

 

I've created an EA based on the Envelopes indicator. i.e. it would open a position when the price crosses this indicator and that's what i get:

I need that when the price has crossed the indicator collected a profit once and the position would not open until the next signal. How to do it?

 
kirill-demo:

I've created an EA based on the Envelopes indicator. i.e. it would open a position when the price crosses this indicator and that's what i get:

I need that when the price has crossed the indicator collected a profit once and the position would not open until the next signal. How to do it?

Show me how you wrote the condition. Most likely, you have not a crossover, but simply Close > Value Indicator.
 

Question to MQL5 developers.

I read the article "Algorithm of ticks generation in MetaTrader 5 strategy tester ". I have such a question:

Why do the developers not offer a simulated real-time price when testing? If it is related to the speed of testing, I am more concerned about quality, not speed of testing. In scalping, every point is important, but modelling a price in the tester on the M1 timeframe does not give the desired quality.

Алгоритм генерации тиков в тестере стратегий терминала MetaTrader 5
Алгоритм генерации тиков в тестере стратегий терминала MetaTrader 5
  • 2010.05.21
  • MetaQuotes Software Corp.
  • www.mql5.com
MetaTrader 5 позволяет во встроенном тестере стратегий моделировать автоматическую торговлю с помощью экспертов на языке MQL5. Такое моделирование называется тестированием экспертов, и может проводиться с использованием многопоточной оптимизации и одновременно по множеству инструментов. Для проведения тщательного тестирования требуется генерировать тики на основе имеющейся минутной истории. В статье дается подробное описание алгоритма, по которому генерируются тики для исторического тестирования в клиентском терминале MetaTrader 5.
 
tol64:
Show me how you have written the condition. Most likely you don't have an intersection, just a Close > Value Indicator.
//--- Creating filter CSignalEnvelopes
   CSignalEnvelopes *filter1=new CSignalEnvelopes;
   if(filter1==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating filter1");
      ExtExpert.Deinit();
      return(-4);
     }
   signal.AddFilter(filter1);
   filter1.PatternsUsage(2);
//--- Set filter parameters
   filter1.Period(PERIOD_H4);
   filter1.PeriodMA(Signal_Envelopes_PeriodMA);
   filter1.Shift(Signal_Envelopes_Shift);
   filter1.Method(Signal_Envelopes_Method);
   filter1.Applied(Signal_Envelopes_Applied);
   filter1.Deviation(Signal_Envelopes_Deviation);
   filter1.Weight(Signal_Envelopes_Weight);

 
kirill-demo:

This is not what is needed. You need the part of the code where the signals are generated. In general, you need to define the condition by which positions are opened. From the screenshot above, you can see that to open trades, the condition is sufficient when, for example:

The close price of a formed candle > the indicator values - (Close[1] > Val_Indicator[1]).

But you need a crossover, you need it to be like this

Close[2] < Val_Indicator[2] && Close[1] > Val_Indicator[1]

 
tol64:

This is not what is needed. You need the part of the code where the signals are generated. In general, you need to define the condition by which positions are opened. From the screenshot above, you can see that to open trades, the condition is sufficient when, for example:

The close price of a formed candle > the indicator values - (Close[1] > Val_Indicator[1]).

But you need a crossover, you need it to be like this

Close[2] < Val_Indicator[2] && Close[1] > Val_Indicator[1]

I have created an EA in a wizard. I do not know mql well. Could you please explain me what to do with the example of envelopes?
 
kirill-demo:
I created an EA in a wizard. I do not know much about mql. Could you please explain me what to do by the example of envelopes?
Actually, the signals are described exactly as you need them in the Help. You can see it here. The picture shows settings of the CCI indicator. Therefore, most likely, your Expert Advisor will not be based only on the signals of the Envelopes indicator. There is also CCI.
Reason: