[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 233

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
How many times have I used the autopoint, but the first time doesn't work.
Here is Init()
I put it in any place of my program (in this case, even in the start for the experiment):
The function returns to the log:
Where is the logic?
VladislavVG has suggested it to me:Because at the init() function stage you are not guaranteed to load data of the financial instrument.
So, value of variable Point without Init() should return the same...
Why would there be nonsense if the function returns an object name specifically?
How many times have I used the autopoint, but the first time it doesn't work.
Where's the logic?
Try it like this:
Not even like this, but like this:
Because Digits is an internal variable, just like Piont.
That should work :)
So the value of Point variable without Init() should return the same...
It's not a fact... Point is an internal variable of MQL processor and it requires some time and some initialization actions. All this usually happens only before the processor calls start() and at the stage of init() the values of the processor's internal variables may not be set.
"Crying" about it:
and here's the log:
18:25:09 IndikatorZZ GBPJPY,Daily: F_CYF INIT: DownL = 0 UpL = 0
Variables are not int by any chance?
I've caught myself like this a couple of times
Variables by any chance int?
I've caught myself doing that a couple of times
No, double. What's wrong with int, I wonder?
Gentlemen, please give me a hint!
I am trying to implement a simple idea that is described in the comments to the program.
The program opens orders in the TESTER at a price that is not coinciding with those specified in the code.
For example, the order opens at the price of 0.86084, while the closest value in the array is 0.85375.
The difference is positive while the code specifies to open orders if the difference is < 0.00000, i.e. negative.
Please advise us where the error is located.
Thank you.