[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 21

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
P.S. When it's not quite clear what's going on, it's better to print out the values before and after the function or statement you want to check, to see how they change. Sometimes input values are not what we expect them to be, and finding where and why they become what they are is much easier in code than guessing why the program doesn't work correctly.Do you haveflag as a local variable?
oh shit...exactly...if you take int flag,flagg; out of Start function...then everything works at once :)) another stupid rookie mistake :) THANK YOU!
oh shit...right...if you take int flag,flagg; out of the Start function...then everything works at once :)) another stupid rookie mistake :) THANK YOU!
It is not only beginners who may make such mistakes, for example, you may inattentively declare a local variable with a name which the global variable already has. The compiler will not generate errors in this case, but the program does not work "correctly". The main thing is to be able to detect such errors.
I am using this function to limit the number of simultaneously traded orders, but in fact the number of orders is 1 more than the number set in the MaxOrders variable. What may be the reason?
I am using this function to limit the number of simultaneously traded orders, but in fact the number of orders is 1 more than the number set in the MaxOrders variable. What may be the reason?
We register orders starting from zero. That is why it looks like this:
The accounting of orders comes from scratch. Therefore it is like this:
Thank you
Here's a look at how the textbook stochastic counts.
Thank you!!!
How can this be? I have an EA, it works. It buys, sells ... all clear stops and takei. but the loss is a lot, so I decide to prescribe another trend filter. two averages - fast and slow - on a very large TF. on H4.
The Expert Advisor should look like this
if (....)
{....
...}
once again - everything works!
and here I put a filter (before that I define MA1=iMA...) and almost at the very top of the if tree (the second condition - and the first one - time if ( Hour()>=7 && Hour()<20)
if (....)
if MA1>MA2
{
{....
...}}
no errors.
But 95% of trades are cut off! And on H4 the picture says the opposite - there must be lots of trades, becauseMA1>MA2 is executed for weeks!
can someone explain what is wrong?
When there are a lot of lines on the chart (horizontal), the labels (line price) on the price scale from these lines "clog" the whole scale.
What is this "tail" parameter with the line price? And is it possible to disable it somehow? (I haven't even found a manual way, but I need a software way)
And I'll just put the price in the line name - that's enough.
Help me check what is the error "EURUSD,M30: uninit reason 5" when my advisor is running often when it needs to open a new position it writes this error and the whole system breaks down (( if there is any code to help correct this error please post one example
Reason codes returned by UninitializeReason(). Can have any of the following values: