You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Sir, After making the changes I ended up with these 4 errors below If I left the
double HHighest = 0;
double LLowest = 0;
'dPriceHigh' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 25)
'dPriceLow' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 54)
'dPriceHigh' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 81)
'dPriceLow' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 94)
When I changed it to
double iHighest = 0;
double iLowest = 0;
I ended up with the 6 errors below
'iHighest' - variable expected C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (26, 19)
'iLowest' - variable expected C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (27, 19)
'dPriceHigh' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 25)
'dPriceLow' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 54)
'dPriceHigh' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 81)
'dPriceLow' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 94)
and don't forget to get rid of the obsolete function calls, Highest() and Lowest() and replace them with iHighest() and iLowest().
Sir, After making the changes I ended up with these 4 errors below If I left the
double HHighest = 0;
double LLowest = 0;
'dPriceHigh' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 25)
'dPriceLow' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 54)
'dPriceHigh' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 81)
'dPriceLow' - variable not defined C:\IBFX_1-Click\experts\indicators\Breakout.mq4 (102, 94)
The variables are declared locally in your function DrawObjects() so your start() function can't see them, either make them globally declared or repeat the same code with variables declared within start()
OK, I thought I put the comments in the void start() under theCustom indicator iteration function. Now I have managed to confuse myself even more, I am going to try to research on how to make them globally declared and where in the code that would go. or if I repeat the same code with variables declared within the start() I am a newbie newbie so I have no clue what your last response means
OK, I thought I put the comments in the void start() under theCustom indicator iteration function. Now I have managed to confuse myself even more, I am going to try to research on how to make them globally declared and where in the code that would go. or if I repeat the same code with variables declared within the start() I am a newbie newbie so I have no clue what your last response means
Have a read of the Book, this bit in particular: https://book.mql4.com/variables/types
A variable declared within a function cannot be "seen" outside of the function because it is declared Locally, meaning local to the function. A variable with global scope is declared globally outside of all functions ( including the start() function ) meaning that it can be "seen" within all functions.
In your original post, I pointed out the Comment line to answer your question. That code had the variables and properly set them. But all you did was paste one isolated line. That will not work.
Either learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt and the nature of your problem. But you haven't even tried to understand the code much less incorporate it.
Have a read of the Book, this bit in particular: https://book.mql4.com/variables/types
A variable declared within a function cannot be "seen" outside of the function because it is declared Locally, meaning local to the function. A variable with global scope is declared globally outside of all functions ( including the start() function ) meaning that it can be "seen" within all functions.
In your original post, I pointed out the Comment line to answer your question. That code had the variables and properly set them. But all you did was paste one isolated line. That will not work.
Either learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt and the nature of your problem. But you haven't even tried to understand the code much less incorporate it.
Ok thanks for pointing me to this book. I was busy looking at the Mql4.com website reading and trying to understand all of the global variable definitions and there functions
Ok thanks for pointing me to this book. I was busy looking at the Mql4.com website reading and trying to understand all of the global variable definitions and there functions