Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 827
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! I don't understand why an error is coming up when declaring an array outside of functions.
Error: '[' - invalid index value
How do I declare a two-dimensional non-dynamic array with variables as indexes?
I tried setting const instead of static. I also tried [][]. Still an error (
Poke a tutorial where to look up this question once and for all, please.
I have a simple code that does not open orders.
In my log it says: '1419717': order buy 0.01 EURUSD opening at market sl: 1.13720 tp: 1.13842 failed [Invalid S/L or T/P].
Here (on the forum) I got a tip: "Stops and Takei should be normalized!
I do not understand what this phrase means?
The compiler doesn't generate any errors or warnings. During testing everything works. I just don't know where and what to read anymore.
If this is too long to explain, please send me the link where I can read about how to normalize stoploss and takeprofit.
Thanks in advance.
Because despite the sequence of assigning values to variables, they remain uninitialized until the program starts. That is, until you run int Oninit(), the variable you use as the array's dimension is not initialized. Move this line to Oninit() and everything should work...
AlexeyVik, thank you!
That's what I'll do. I didn't think about Oninit, but I guess it's true.
Please give me a hint ))))
There is some amount of graphical objects on the chart.
A new bar has finished forming. What is the easiest way to determine if it has touched any object?
(I do not want to search for prices of all objects and compare if the price range of the latest bar has touched any of them).
In other words, the price and date range how to determine if there is any graphic object in these coordinates.
I have a simple code that does not open orders.
In my log it says: '1419717': order buy 0.01 EURUSD opening at market sl: 1.13720 tp: 1.13842 failed [Invalid S/L or T/P].
Here (on the forum) I got a tip: "Stops and Takei should be normalized!
I do not understand what this phrase means?
The compiler doesn't generate any errors or warnings. During testing everything works. I just don't know where and what to read anymore.
If this is too long to explain, please send me the link where I can read about how to normalize stoploss and takeprofit.
Thank you in advance.
NormalizeDouble() dig in the reference book. But if your broker does not allow you to expose stops at the time of opening a market order, you should enter them in zeros and expose them separately, at the second step. There are examples in the kodobase.
NormalizeDouble() dig into the reference. But if the broker doesn't allow you to place stops at the time of opening a market order, you should enter them in zeros and place them separately, at the second step. There are examples in the kodobase.
Guys, push me in the right direction...
For example:
It never saves what it prints...
Something like this:
CHANDNT?
Temporarily wrote high bits separately low bits separately.
It seems that a global variable of type double does not fit long.
Although it says here that there should be no problem except for situations where"if an integer is greater than 9223372036836854774784 or less than -9223372036854774784".
But agree, the chart ID = 130659893770676840 is less than 9223372036854774784 by a full digit at least.
P.S. If anyone can explain my mistake or is it a glitch, thanks in advance. I'll keep checking back here.
Please advise
How can I save the results of EA test in mt4? Into a folder or in HTML format too)?