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
Hello, please use the SRC button when posting code.
All of the code in yellow is OUTSIDE the 'for' loop.
So the value of 'name' is always the name of the final object.
Perhaps try this (presuming price1 and price2 are already declared somewhere else):
Many thanks for your help. How to print to see the price1... in the journal to make sure it works.
The same way you print the name...
Thanks. I have the print command in the EA. It is not getting printed in the journal. Where does it print the output?.
Experts (tab to the left of Journal)
Experts (tab to the left of Journal)
I have an indicator drawing trend line. The EA is based on the trend lines drawn by the indicator. Is there any way to check why it not printing the values. I am attaching the files. Sorry to bother you. Thanks for your help.
You will need to go through your code adding Print statements at various points.
That way you can track down your problem.
You need to look for functions not getting called, or unexpected values of variables.
It will take some time, but it is something you can do yourself.
For example, I have an EA with a variable that increases by 1 every tick.
I don't know why sometimes the variable gets reset back to 0
And the output:
I can see that the myVariable is increasing by 1 every tick, but OnTimer() is resetting it back to zero.
I now know where the problem is.
----
Or you can try to use the debug function built into MetaEditor, although some users have been reporting issues with that... YMMV
You will need to go through your code adding Print statements at various points.
That way you can track down your problem.
You need to look for functions not getting called, or unexpected values of variables.
It will take some time, but it is something you can do yourself.
For example, I have an EA with a variable that increases by 1 every tick.
I don't know why sometimes the variable gets reset back to 0
And the output:
Thanks. Shall I delete the files ?.
I can see that the myVariable is increasing by 1 every tick, but OnTimer() is resetting it back to zero.
I now know where the problem is.
----
Or you can try to use the debug function built into MetaEditor, although some users have been reporting issues with that... YMMV
Thanks. Shall I delete the files.
That is your decision - there are nearly 800 lines of code between those 2 indicators... somebody may have the time to go through it for you.
But you may get a quicker solution by narrowing down the problem yourself first.
Good luck
That is your decision - there are nearly 800 lines of code between those 2 indicators... somebody may have the time to go through it for you.
But you may get a quicker solution by narrowing down the problem yourself first.
Good luck
Many thanks for your help. Any area where to look first?. The Meta editor shows only warnings. No errors.