[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 461
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
Can you tell me why in my case OrderSended variable is not set to false when all conditions are met?
It says in the log MACD2 and MACD3 are greater than zero, but OrderSended is still true, although it should become false when both variables are greater than zero.
Can you tell me why in my case OrderSended variable is not set to false when all conditions are met?
It says in the log MACD2 and MACD3 are greater than zero, but OrderSended is still true, although it should become false when both variables are greater than zero.
and in the code, one is greater than zero and the other is less than zero
and in the code, one is greater than zero and one is less than zero.
So it's just a signal to open a position, that's where the conditions are greater than zero
So it's just a signal to open a position, that's where the conditions are greater than zero
But it's still a good idea to put parentheses here, because 99% of the conditions are not calculated in the order you would like them to be:
Tell me if this design will work
That is, if there are warrants with a specific magic number then...
Tell me if this design will work
That is, if there are warrants with a specific magic number then...
int OrdersTotal(int magic)
So, I did my own thing with fractals - I wrote my own indicator... Well, it's easier for me. Here's the question-- I got a problem.
how do I move the arrows back 3 bars? :(
A little piece of code...
SetIndexStyle(0, DRAW_ARROW,0,1);
SetIndexArrow(0,217);
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexEmptyValue(0, 0.0);
SetIndexStyle(1, DRAW_ARROW,0,1);
SetIndexArrow(1, 218);
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexEmptyValue(1, 0.0);
IndicatorShortName("My_iFractals");
SetIndexLabel(0, "iFractalsUp");
SetIndexLabel(1, "iFractalsDn");
UPD
Вопрос снят, сорри опять за кривость свою, но может кому будет интересно ответ- SetIndexShift(0,-3);
But tell me, after a function is executed, e.g. for, does this function return a single value or all of them? For example in a loop a value has been assigned to two variables, will the loop return the value of both variables, or only the last one?
What a mess...
1) for is not a function, it is a loop operator
2) the function only returns what it was told to return with return
3) Variables are loosely related to loops. You can change as many as 10 of them in a loop
Guys, I can't figure out what's wrong, it's not clear what's going on with orders closing:
when it's like this, it works fine:
I add this code below the top one:
after the first function does not work and does not close orders. I don't see any errors in the log. I have made a mistake there, why?
I have moved all Object down both functions and it is working.