Thank you WHRoeder - page 2

 

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)

 
RaptorUK:
 and don't forget to get rid of the obsolete function calls,  Highest() and Lowest() and replace them with iHighest() and iLowest().

Function calls . . .  not variables.
 
Eurozo:

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()
 
RaptorUK:
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

 
Eurozo:

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.

 
RaptorUK:

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. 

 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
 
WHRoeder:

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 your help. Actually I am reading the Mql4.com website as I type and trying to understand the code and how it peforms the function to get the values.  
 
Eurozo:
 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
Still reading, thanks for pointing me in the right direction RaptorUK
 
Eurozo:
 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
 RaptorUK I'm still wondering though if I should make the indicator into an EA to get the values since thats what the other indicator that produces these results is.  In your opinion, If its just an indicator would it be angle to give me these results?
Reason: