like remcous told me, I have two variables in this case I have three Global values :
int Buy_trade=0;
int Sell_trade=0;
int x=1;
so I think that what you mean is my variable code is If(Buy_trade or Sell_Trade >0 ||<0) and they get its value from the global but do I need to assign a value of my global variable inside my code because it doesn't work . If I didn't answer you give me an Example of a variable code and its value.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I think your code is better, I have this one I don't know if it will work:
I will try it all and see what works.
be carefull with your variable OrderType, it's a mql function...
be carefull with your variable OrderType, it's a mql function...
Will do, and thanks again remcous.
You can not use any Trade Functions until you first select an order.
You can not use any Trade Functions until you first select an order.
I'll keep it in mind Thanks.
I'll try this and see:
I tried it all nothing seem to work I tried this one also I don't know what's wrong with it:
I tried it all nothing seem to work I tried this one also I don't know what's wrong with it:
So I need to take out OrdersTotal() or Add a Function that counts trades?
This willnever be true.
You can not select an order if the orderstotal == 0
I asked you in post #2
What is the variable CODE and where does it get its value from?
You ignored the question
Now you have added a new variable Code.
I asked you in post #2
You ignored the question
Now you have added a new variable Code.
sorry for the late replay, I thought I answered you I don't know what you mean maybe you mean this :
like remcous told me, I have two variables in this case I have three Global values :
so I think that what you mean is my variable code is If(Buy_trade or Sell_Trade >0 ||<0) and they get its value from the global but do I need to assign a value of my global variable inside my code because it doesn't work . If I didn't answer you give me an Example of a variable code and its value.