MQL5 Wizard EA - BUG- the Global Inputs are overwritten by default values

 

Dear all,

I spent some time to identify the problem, then searched and found it is not a new issue,  and seemed have not fixed for years, my version is Version 5.00 build 2615, 17Sep 2020.

Below are my settings, 

/--- inputs for main signal

input int                Signal_ThresholdOpen                  =50;                  // Signal threshold value to open [0...100]

input int                Signal_ThresholdClose                 =10;                  // Signal threshold value to close [0...100]

input double             Signal_PriceLevel                     =0.0;                 // Price level to execute a deal

input double             Signal_StopLevel                      =0.0;                // Stop Loss level (in points)

input double             Signal_TakeLevel                      =0.0;                // Take Profit level (in points)


But All the inputs are reset to different default values stored somewhere before executing the lines below.


  signal.ThresholdOpen(Signal_ThresholdOpen);

   signal.ThresholdClose(Signal_ThresholdClose);

   signal.PriceLevel(Signal_PriceLevel);

   signal.StopLevel(Signal_StopLevel);

   signal.TakeLevel(Signal_TakeLevel);

 

What I am doing now is hard code the values as below


  signal.ThresholdOpen(50);

   signal.ThresholdClose(10);

   signal.PriceLevel(0.0);

   signal.StopLevel(0.0);

   signal.TakeLevel(0.0);


Hope this can help someone is still looking for temp solution.  

Is it a bug?  If yes, not sure how to inform MetaQuotes and ask for a fix.

Thanks !  

Mike

Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Requests to execute trade operations are formalized as orders. Each order has a variety of properties for reading. Information on them can be obtained using functions Position identifier that is set to an order as soon as it is executed. Each executed order results in a deal that opens or modifies an already existing position. The identifier of...
 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button


 
mikewu.fx :


Be careful and never use the word 'BUG' - you look ridiculous in this situation. You just need to learn how to use the strategy tester and code debugging.

So, you have launched your Expert Advisor for testing. The EA settings are reflected in the 'Strategy Tester' window in the 'Inputs' tab

So how does it work. Let's take a brand new Expert Advisor ('new ea test barabashkakvn.mq5'). Here are its input parameters:

//--- input parameters
input int      InpTestParameters = 9; // Test parameters

We launch this Expert Advisor directly from the MetaEditor - using the button of any of these buttons  

We see in the visual tester:

Test parameters: 9

in terminal:

new ea test barabashkakvn (EURUSD,M15)  Test parameters: 9


Now we return to the terminal in the 'Strategy Tester' window in the 'Inputs' tab and change the ' Test parameters' value to 10:


Run two tests from the MetaEditor again - using the button of any of these buttons ...

We see in the visual tester:

Test parameters: 10

in terminal:

new ea test barabashkakvn (EURUSD,M15)  Test parameters: 9


Just be aware of this and clearly understand where and what you are changing

 
Sergey Golubev
    Dear Sir, Noted, Thanks a lot ! 
 
Vladimir Karputov:

Be careful and never use the word 'BUG' - you look ridiculous in this situation. You just need to learn how to use the strategy tester and code debugging.

So, you have launched your Expert Advisor for testing. The EA settings are reflected in the 'Strategy Tester' window in the 'Inputs' tab

So how does it work. Let's take a brand new Expert Advisor ('new ea test barabashkakvn.mq5'). Here are its input parameters:

We launch this Expert Advisor directly from the MetaEditor - using the button of any of these buttons  

We see in the visual tester:

in terminal:


Now we return to the terminal in the 'Strategy Tester' window in the 'Inputs' tab and change the ' Test parameters' value to 10:


Run two tests from the MetaEditor again - using the button of any of these buttons ...

We see in the visual tester:

in terminal:


Just be aware of this and clearly understand where and what you are changing



 Dear  Vladimir Karputov,


Thanks a lot for your help, now I can test my EA. and I am sorry to use the word. 

I have read quite few articles from you, thanks a lot !

Reason: