[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 324

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
Alert, as an option. Comment -- is fine.
Replace while(true) by while(!IsStopped())
Late.)))
Yes, I forgot about IsStopped.
Late.)))
I can give you a head start next time :) .
Write the f-fi where the output will be made and write what you need through it.
Option.
>> Thank you. Is it possible to change colour of Comment? Or only white?
I can give you a head start next time :) .
By the way yes, thank you, very quick reply here :)
Thank you. Is it possible to change the colour of Comment? Or only white?
>>No, I don't.
When there is no need to process every tick, how can I make the code be processed only when a new bar appears?
Surely there must be a ready-made function. Throw me a link...
UPDATE
Thanks, found it (:
How do I use the script to set my own scale on the chart?
The functions that tell you which bar is displayed first are there, but how to reset it is not.
Hi all, who can explain? The RefreshRates() function, does it always need to be called or when an Expert Advisor or script performs long calculations, does it work automatically, for example, in error handling functions?
Second question: here is an example of code, I fixed an error, passed a parameter to switch operator...
Well, now there's another error, it seems undefined variable B
, didn't I declare it?
This is what the error message looks like :
'B' - variable not defined ----------------- C:\Program Files\MetaTrader - Masterforex\experts\scripts\2.mq4 (31, 7)
Here is another question, what are these numbers? (31, 7), they are always different for different errors, I looked at the same entries in the specified directory, it's just like an error name in a document... is it possible in MetaEditor 4, somewhere to see the description of the solution, for example, as in the Expert Advisor, the errors of execution and execution correspond to their values, where for each number a specific cause of error???
Hi all, who can explain? The RefreshRates() function, does it always need to be called or when Expert Advisor or script perform long calculations, it triggers automatically, e.g. in error handling functions?
Second question: here is an example of code, I fixed an error, passed a parameter to switch operator...
well, now there's another error, like undefined variable B
didn't I declare it?
This is what the error message looks like:
'B' - variable not defined ----------------- C:\Program Files\MetaTrader - Masterforex\experts\scripts\2.mq4 (31, 7)
Hence another question, what are these numbers? (31, 7), they are always different for different errors, I looked at the same entries in the specified directory, it's just like an error name in the document... is there somewhere in MetaEditor 4, somewhere to see the description of the solution, for example as in the Expert Advisor, execution and runtime errors correspond to their values, where for each number a specific cause of the error??
It should be defined outside the start() function, make it global. Then the variable will be available from any function
It should be defined outside of the start() function, make it global. Then the variable will be available from any function
Let me explain. Start is the same function as others, so all variable definitions within Start have no effect outside of it. The variable can be globally defined only in the Expert Advisor body, before the init. Then it will be visible to all functions.
Numbers are line number and number of character in the line, where the error occurred.