ARRESSS23:
this message is translated from french to english via the google translation service.
by doing a backtest, the buy order is executed also the sell order, but only for the first time. then only buy ordrer is executed. where is my errors please ???- Welcome. When using mechanical translation, always use simple language structure.
You can also translate by selecting text and using the translate pull down. - You open a sell and set trade to false. When do you ever set it to true?
whroeder1:
- Welcome. When using mechanical translation, always use simple language structure.
You can also translate by selecting text and using the translate pull down. - You open a sell and set trade to false. When do you ever set it to true?
Thank you Mr whroeder1;
I defined the (trade) variable as (true) at the beginning of the code.
Frankly, I used this condition:
If (trade == True)
{
OrderSend ()
trade = False;
}
And I don't know its meaning logically. I used it to avoid the execution of multiples sell orders.
ARRESSS23:I defined the (trade) variable as (true) at the beginning of the code.
Yes you did, but that is not what I asked. I said "You open a sell and set trade to false. When do you ever set it to true?"
bool trade=true; // Global declaration
whroeder1:
Yes you did, but that is not what I asked. I said "You open a sell and set trade to false. When do you ever set it to true?"
Yes you did, but that is not what I asked. I said "You open a sell and set trade to false. When do you ever set it to true?"
hmmmmm .
Now, I understand what you mean.
I can only put it beside to the comparison of (normalisedouble).
I tried but it did not work.
what do you think ??
Files:
TEST_6.mq4
4 kb

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 Every body.
this message is translated from french to english via the google translation service.
I'm sorry if you find some errors.
I am a beginner in programming, I just studied the language mql4.
I'm training on designing some basic functions.
I want to program a very easy code:I want metatraider to execute a buy order, then if the price go up or down by 30 points, it opens a second sale order.
After 60 points, it closes the 2 buy and sell orders.
by doing a backtest, the buy order is executed also the sell order, but only for the first time. then only buy ordrer is executed.
where is my errors please ???
thank you