Errors, bugs, questions - page 3153

 

Bug- Phantom indicator code

There is an indicator, there is an espert working on it. The code of the indicator is changed. It is recompiled and indicator changes can be clearly seen on the chart. The Expert Advisor is run in the tester, but it looks like the code was not changed. The result is the same.

You can even delete ex5 of the indicator. You can continue running the expert in the tester (this deleted ex5 is clearly marked in it) as if nothing has happened. Where does it get the file for execution, from ether????

If you restart the terminal and run the tester after that it will see the new code. (and throws an error if ex5 is missing)


I tried different ways to make it see the new code - I re-logged the terminal (without rebooting) and recompiled the espert itself. Changed expert parameters in the tester. Nothing helps, except restarting the terminal

 
Max B #:

Bug- Indicator phantom code

There is an indicator, there is an espert working on it. The code of the indicator is changed. It is recompiled and indicator changes can be clearly seen on the chart. The Expert Advisor is run in the tester, but it looks like the code was not changed. The result is the same.

You can even delete ex5 of the indicator. You can continue running the expert in the tester (this deleted ex5 is clearly marked in it) as if nothing has happened. Where does it get the file for execution, from ether????

If you restart the terminal and run the tester after that it will see the new code. (and throws an error if ex5 is missing)


I tried different ways to make it see the new code - I re-logged the terminal (without rebooting) and recompiled the espert itself. Changed expert parameters in the tester. Nothing helps except rebooting the terminal.

You have already answered your own question. If you delete something and it appears, it means it's being saved somewhere))). When you boot the terminal, the entire environment is pulled from the profile from the last state. It is as if you have reset all Expert Advisors and indicators on the terminal window with preset parameters. In your case, the Expert Advisor needs to be recompiled or it can be removed and re-loaded. It (the EA) has already pulled up the handles and data of the old version and does not recalculate them.

 
Valeriy Yastremskiy #:

You yourself have answered your own question. If you delete something and it appears, it must be stored somewhere.) When you load the terminal, the entire environment is pulled from the profile from the last state. It is as if you have reset all Expert Advisors and indicators on the terminal window with preset parameters. In your case, the Expert Advisor needs to be recompiled or it can be removed and re-loaded. It (the EA) has already pulled handles and data of the old version and does not recalculate them.

The Expert Advisor in the terminal does not hang on anything, it is only the strategy tester that lets it in. The Expert Advisor itself has a deinit where I have IndicatorRelease(handle_mtf_Sys); I tried to recompile the EA - it does not help. It still somehow takes the phantom code

 
Max B #:

The Expert Advisor in the terminal does not hang on anything, only the strategy tester allows it. The Expert Advisor itself has a deinit where I IndicatorRelease(handle_mtf_Sys); I tried to recompile the Expert Advisor - it doesn't help. It still somehow takes phantom code

In the tester, besides the Settings tab, there is also a Settings tab. Check them, perhaps there are old default values. If that's not it too, then yes, it's a bug, I had the same thing about 2 months ago, then it went away, I don't know what it was about.
 
Max B #:

The Expert Advisor in the terminal does not hang on anything, only the strategy tester allows it. The Expert Advisor itself has a deinit where I have IndicatorRelease(handle_mtf_Sys); I tried to recompile the EA - it doesn't help. It still somehow takes phantom code

First you compile the indicator, then the EA? And the EA takes data of the old indicator? If so, it must be a bug. The Expert Advisor does not hang, it works in the chart window of the terminal. And the normal closing remembers and caches the state of all charts. Maybe even with physical files. Don't know. But judging by the bug it's possible.

If you deleted an exechanger, but have an mcl file, then all the mcl files with missing exechangers are compiled when the terminal is loaded. This is one of the ways to compile and get mcl files exeshes without meta-editor - to reload the terminal.

 
Wizard #:
In the Strategy Tester, besides the Settings tab, there is also the Settings tab. Check them, maybe the old values are there by default. If it is not the same, then yes, this is a bug, 2 months ago, I was the same, then disappeared, I do not know what it was.

The parameters are memorised there - but they don't change and don't matter in this case. It is the code inside the indicator that changes. In general, the bug is unpleasant - every time before running the tester, the terminal has to be reloaded.

Valeriy Yastremskiy #:

First you compile the indicator, then the Expert Advisor, and the Expert Advisor takes data of the old indicator? If so, it must be a bug. The Expert Advisor does not hang, it works in the chart window of the terminal. And the normal closing remembers and caches the state of all charts. Maybe even with physical files. Don't know. But judging by the bug, it may be so.

The thing is that our EA does not sit on any chart. It is only in the strategy tester selected. I am concerned about the debugging in the strategy tester, not in the terminal. It should not be cached anywhere.

When starting the Strategy Tester, the latest compiled version of the indicator and EA should be loaded, not the unknown phantom from unknown sources. Does it make sense?

 
Max B #:

The parameters are memorised there - but they don't change and don't matter in this case. It is the code inside the indicator that changes. In general, this bug is unpleasant - every time before starting the tester I have to restart the terminal.

The thing is that our EA does not belong to any chart. It is only in the strategy tester. I care about debugging in the strategy tester, not in the terminal. It should not be cached anywhere.

When starting the Strategy Tester, the latest compiled version of the indicator and EA should be loaded, not the unknown phantom from unknown sources. Does it make sense?

Make a reproducible example of a bug and post it here with the code and the sequence of actions. Maybe developers will pay attention).
 

I want to make a drop-down list of currency pairs and instruments (own pairs) in the EA input settings window. How can I do it?

Second question: How would it be correct to write...

Like this:

double stop = SymbolInfoDouble(_Symbol, SYMBOL_ASK) - NormalizeDouble(100*_Point, _Digits);

Or like this:

double stop = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_ASK) - 100*_Point, _Digits);

???

Third question. Is it possible to normalise prices 2-3 times in a row? Won't it affect the job?

I know the questions are silly, but it's the little things that are plaguing me at the moment, even if both options work. Need to know how to get it right.

 
Wizard #:

I want to make a drop-down list of currency pairs and instruments (my pairs) in the EA input settings window. How can I do it?

Second question: How would it be correct to write...

Like this:

Or like this:

???

Third question. Is it possible to normalise prices 2-3 times in a row? Won't it affect the job?

I know the questions are silly, but it's the little things that plague me at the moment, even if both options work. Need to know how to get it right.

This NormalizeDouble construct should be avoided if possible, it is heavy to handle.

 
Vitaly Muzichenko #:

This NormalizeDouble construction should be avoided if possible, it's heavy to handle.

Got it. And if I don't want to use NormalizePrice function of CSymbolInfo class (I try to avoid libraries if possible), is there an alternative?

Документация по MQL5: Стандартная библиотека / Торговые классы / CSymbolInfo
Документация по MQL5: Стандартная библиотека / Торговые классы / CSymbolInfo
  • www.mql5.com
CSymbolInfo - Торговые классы - Стандартная библиотека - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Reason: