Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 235
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
And of course when we open the next buy, we immediately roll over (StopLoss equals our average price + 50 pips) on all positions .
This is the scoundrel who sometimes does not take the last position. We had 3 positions, but 4 of them opened. I forgot to put StopLoss on the fourth position.
DedZone should be held:
DedZone is in initialization of the Expert Advisor.
And when both are equal to zero, what? Alpari uses spread*2 in such a case.
And you haven't answered my question about the logic of those lines.
it's better to do it this way (someone wrote that he had problems with your way of doing it when modifying or deleting orders) :
And why oil and butter ??? (leave something alone).
Thank you!
Seems to agree with the expert :))
And you haven't answered my question about the logic of those lines.
artmedia70:
The entire logic of an EA's behaviour can be divided into logical blocks, which, depending on the conditions, are either executed or not.
For your own purposes, you can see that this block can be a number of strings enclosed in curly braces:
If (condition) {if the condition is true, the block enclosed in those braces is executed}
Otherwise {if the condition above is not true, the block enclosed in those braces is executed}
If there are no curly brackets after the condition, the block executed when the condition is true is a single line immediately after the condition:
If (condition) This line is executed
Otherwise this line is executed.
In my examples If is if and Otherwise is else.
Taken here
And when both are zero, then what? Alpari uses spread*2 in that case.
And you did not answer my question about the logic of those strings.
Thank you for the information regarding Alpari.
As for the Line Logic, ALXIMIKS answered it.
I should add for myself that modification should be done only if all the conditions are true. If at least one of them fails, we go on.
Thank you for the information regarding Alpari.
Regarding String Logic, ALXIMIKS replied.
I should add that in that case modification should take place only if all conditions are true. If at least one of them fails, we move on.
He showed me for some reason my own words written once to someone.
I wanted to get an answer to my question about logic. All the ifs () in that code block go one after another. It means that if the first condition is true, the second will also be true, if the second is true, the third will be true and so on, but... If the first condition is not true, the second will not be executed, but the third will be checked again.
Maybe that's the way it should be, after all:
This is just my guess, as I have absolutely no idea what logic you have in mind and don't know what some of the variables and functions do and contain/return.
1) He showed me for some reason my own words once written to someone.
2) That's what I wanted you to say about the logic. You have all the if () in that block of code going one after another. Which means that if the first condition is true, the second condition will also be true, if the second condition is true, the third condition will also be true, etc., but... If the first condition is not true, the second will not be executed, but the third will be checked again.
1) well that was for everyone, not just you.
2) you once already made this statement, a few days ago, only I forgot to double-check this information on my part at the time.
Now I made a simple script:
And it turned out you were wrong: NO ALERT !!!
1) well that was for everyone, not just you.
2) You made that statement once before, a few days ago, but I forgot to double-check the information at the time.
Now I made a simple script:
And it turned out you were wrong: NO ALERT !!!
Well, I agree. In this case, I was a bit hasty when I wrote earlier about what and how the nested conditions would be enforced without braces. You are right in this situation. Do you know why?
Try to get else executed in your code.
Well, I agree. In this case, I was a bit hasty when I wrote earlier about what and how the nested conditions would be enforced without braces. You are right in this situation. Do you know why?
Try to get else executed in your code.
No Alert from this script. Else refers to the condition " if (5>3){Alert ("AAAAAAAAAAAAAAAAAAAAAAAAAA"); a=5;} "
Acknowledgments :
have anAlert: "a=0".
Result - condition fail handling is only possible for the last condition when the curly brackets "{" are not used during the enumeration of a certain series of conditions.
no Alert from this script. Else refers to the condition " if (5>3){Alert ("AAAAAAAAAAAAAAAAAAAAAAAAAA"); a=5;} "
Acknowledgments :
have anAlert: "a=0".
The result is that the non-condition handling is only possible for the last condition, when the curly brackets "{" are not used during the enumeration of a certain series of conditions.
I.e. parentheses are needed to organize logical branches. Without them, the first condition is prime. If it is not true, other conditions will not be executed.
Try to work it out:
And after that, figure out what else it refers to:
If the first condition is not met, we have an alert: "a=2"
If the second condition is not met, we have an alert: "a=1"
When the third condition is not met, we have an alert: "a=0".
Yeah, at first it was unexpected at all))