Errors, bugs, questions - page 1140

 

In MQL4 you can prescribe the line of the indicator MODE_TE NKANSEN and shift (shift relative to the current bar)

double TK = iIchimoku(NULL, PERIOD_CURRENT, Tenkan, Kijun, SenkouB, MODE_TENKANSEN, 0);

How do I write the exact same function in mq5 ?

I wrote a line, but it gives out an error 'iIchimoku' - wrong parameters count Ichimoku.mq5

This is what I get in the TENKANSEN_LINE, 0

double TK = iIchimoku(NULL, PERIOD_CURRENT, Tenkan, Kijun, SenkouB, TENKANSEN_LINE, 0);
 
Zeleniy:

In MQL4 you can prescribe in a line which line to use in the indicator MODE_TE NKANSEN and shift (shift relative to the current bar)

What is the correct way to write the exact same function in 5?

what does it return in 5?
iIchimoku
 
Zeleniy:

In MQL4 you can write in a line what line of the indicator iIchimoku MODE_TE NKANSEN and shift (shift relative to the current bar)

How do I write the exact same function in 5 ?

I wrote a line, but it gives out an error 'iIchimoku' - wrong parameters count Ichimoku.mq5

This is what I get in the line TENKANSEN_LINE, 0

In MQL5, the entry of iIchimoku indicator is different.

int  iIchimoku(
   string           symbol,            // имя символа
   ENUM_TIMEFRAMES  period,            // период
   int              tenkan_sen,        // период Tenkan-sen
   int              kijun_sen,         // период Kijun-sen
   int              senkou_span_b      // период Senkou Span B
   );
Документация по MQL5: Технические индикаторы / iIchimoku
Документация по MQL5: Технические индикаторы / iIchimoku
  • www.mql5.com
Технические индикаторы / iIchimoku - Документация по MQL5
 

The OnTesterPass() function is not called after all passes of optimization, and it always skips several optimization passes. This happens even if the frame is forcibly created using a loop.

As a result of optimization of this template, number of passes in the journal of the terminal will always be 5-20 passes less than specified for optimization.

What is the purpose of slow optimization and OnTesterPass() function if it always fails to test several passes that can be the searched ones?

input int         StringReadOrSumma=1000;
//---
void OnTick()  {  }
//---
long PassNum;
string NameFrameStatistik="stat";
long FrameID_Statistik;
double OnTesterResult;
double ArrValueStatistik[];
//---
double OnTester()
  {
   ArrayResize(ArrValueStatistik,1);
   ArrValueStatistik[0]=StringReadOrSumma;
   if(!FrameAdd(NameFrameStatistik,FrameID_Statistik,OnTesterResult,ArrValueStatistik)) return(0.0);
   return(0.0);
  }
//---
void OnTesterPass()
  {
   if(!FrameNext(PassNum,NameFrameStatistik,FrameID_Statistik,OnTesterResult,ArrValueStatistik))
     { Print(__FUNCTION__,__LINE__);return;}

   static int numPass=0;
   numPass++;
   Print(ArrValueStatistik[0]," --- ",numPass);
  }
 
lewvik:

The OnTesterPass() function is not called after all passes of optimization, and it always skips several optimization passes. This happens even if the frame is forcibly created using a loop.

As a result of optimization of this template, number of passes in the journal of the terminal will always be 5-20 passes less than specified for optimization.

What is the point of slow optimization and OnTesterPass() function if it never tests several passes and those are probably the searched ones?

The event can be generated for several frames at once. I.e. it's better to read frames in a loop, for example, through while(!FrameNext(...)).

 
antt:

An event can be generated for several frames at once. I.e. it is better to read frames in a loop, e.g. while(!FrameNext(...))).

I tried to read frames in the loop and create in the loop, the result is the same - a few passes disappear somewhere without a trace. Several frames or one created no difference. Why is it so? Is it a bug or I'm something wrong, if a bug - it's a serious assumption, how come - I searched for the right parameters and eventually lost in the search!

Servicedesk request#1007598| 2014.05.04 12:33

 

people, who can tell me how in mql5 to calculatethe amount of free funds needed to open 1 lot of some symbol

I know how to do it in mql4, but in mql5 I can't find it

 

Such a bug has been detected in the EA tester. Metatrader Client 5. Build 930. Broker: Otkrytie. FORTS.

In the tester the cancelled orders are shown as if they were executed. It says 2.0/2.0. Although the order is just cancelled:

On the demo account, the cancelled orders are shown as not executed (or partially executed). For example 2.0/0.0 or 2.0/1.0. Which is the correct behaviour:

Accordingly, this bug interferes with keeping track of the actual quantity executed. When testing.

Is it a bug? :)

 
harbor:

people, who can tell me how in mql5 to calculatethe amount of free funds needed to open 1 lot of some symbol

In mql4 I know how, but in mql5 I cannot find it

Maybe it is like this:

Print("Margin=", SymbolInfoDouble(_Symbol,SYMBOL_MARGIN_INITIAL)); 
 
escoman:

Such a bug has been detected in the EA tester. Metatrader Client 5. Build 930. Broker: Otkrytie. FORTS.

In the tester the cancelled orders are shown as if they were executed. It says 2.0/2.0. Although the order is just cancelled:

Thanks for the message. Corrected.
Reason: