MQL4 display indicator parameters in a window or log

 

Hi everybody,

I'm new here and I'm a beginner at MQL4 programming. I have a lot of programming knowledge in C# and JAVA, MQL4 is new for me. I was wondering is it possible to do something like this:

In my program I have ADX indicator and I want to test the EA on history data. I would like a pop up window every time when it enters a buy or sell trade which displays values of my parameters (DI+,DI- and LEVEL) and in this time the testing should pause until I klick on a window OK button.

I need a way to get the values of my parameters every time it enters a trade because it seems that the indicator chart is showing other values then the values that have been calculated in my program. It often enters the trade when the conditions have not been met. 


Thank you for your help. 

 
drake882:

Hi everybody,

I'm new here and I'm a beginner at MQL4 programming. I have a lot of programming knowledge in C# and JAVA, MQL4 is new for me. I was wondering is it possible to do something like this:

In my program I have ADX indicator and I want to test the EA on history data. I would like a pop up window every time when it enters a buy or sell trade which displays values of my parameters (DI+,DI- and LEVEL) and in this time the testing should pause until I klick on a window OK button.

I need a way to get the values of my parameters every time it enters a trade because it seems that the indicator chart is showing other values then the values that have been calculated in my program. It often enters the trade when the conditions have not been met. 


Thank you for your help. 


MQL4 Documentation

https://docs.mql4.com/


MQL4 Tutorial Book

https://book.mql4.com/


MQL4 Trade Functions

https://docs.mql4.com/trading


MQL4 Common Functions

https://docs.mql4.com/common


MQL4 Common Function (Alert)

https://docs.mql4.com/common/alert


MQL4 Technical Indicators

https://docs.mql4.com/indicators


The pages referenced above should give you a great deal of help if you would like to code it yourself.

If not, then there is always the option of hiring someone to do it for you.

https://www.mql5.com/en/job/new

- Jack

MQL4 Reference
MQL4 Reference
  • docs.mql4.com
MetaQuotes Language 4 (MQL4) is a built-in language for programming trading strategies. This language is developed by MetaQuotes Software Corp. based on their long experience in the creation of online trading platforms. Using this language, you can create your own Expert Advisors that make trading management automated and are perfectly suitable...
 
drake882:

I'm new here and I'm a beginner at MQL4 programming. I have a lot of programming knowledge in C# and JAVA, MQL4 is new for me. I was wondering is it possible to do something like this:

In my program I have ADX indicator and I want to test the EA on history data. I would like a pop up window every time when it enters a buy or sell trade which displays values of my parameters (DI+,DI- and LEVEL) and in this time the testing should pause until I klick on a window OK button.

I need a way to get the values of my parameters every time it enters a trade because it seems that the indicator chart is showing other values then the values that have been calculated in my program. It often enters the trade when the conditions have not been met. 


You can simply Print current parameters before every trade, along with buffer values and then analyze the data.

Do you change indicator parameters on the fly?

Do you consider that indicator is recalculated on every tick and its lines can trigger your custom events just temporarily and then, when bar is closed this consition does not seem true anymore but the trade is already open?

Are you in MT5 or MT4?

Reason: