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
this is my latest code. cant think of anything wrong except it is not giving me the results i want
If you look at page 2 this topic you can find what I gave you
This is the begin.....
Give your comment ..... about what is different from yours so far...
Then take a read at https://www.mql5.com/en/forum/139654 and try to make a loop counting down checking trades
As you can see I asked to make a loop counting down checking trades
That is my next step inside the code
I only ask you for that part of code
make it count buy trades and sell trades separetly
If you look at page 2 this topic you can find what I gave you
i removed it because i didnt know how to use it. you gave me the code partially i couldnt see how it functions.
--
This is the begin.....
Give your comment ..... about what is different from yours so far...
Then take a read at https://www.mql5.com/en/forum/139654 and try to make a loop counting down checking trades
As you can see I asked to make a loop counting down checking trades
That is my next step inside the code
I only ask you for that part of code
make it count buy trades and sell trades separetly
like this?
//blocks of codes to execute
}
i removed it because i didnt know how to use it. you gave me the code partially i couldnt see how it functions.
The moment The EA starts again
BUYS is set to 1
SELLS is set to 1
OrdersTotal() is giving total of all open trades on your account
It can be zero then we have notrades open and we don't need to check if there are trades of this EA
If OrdersTotal() > 0 BUYS stays 1 and SELLS Stays 1
we need to check in that case if it is from our EA and we have to count the different types (buy,sell,buylimit....)
so
like this?
//blocks of codes to execute
}
Use SRC Button
This loop we only start ( for what condition )
How do you know the selected trade in the loop is buy or sell??
And how do you count them ??
Use SRC Button
This loop we only start ( for what condition )
How do you know the selected trade in the loop is buy or sell??
And how do you count them ??
opps.
for the closed trade function.
using
if (OrderType() == OP_SELL && pBid < MA5)
to differentiate buy and sell.
is there anything wrong with my conditions to open order?
shud i remove it and replace with the loop i used for close order function?
opps.
for the closed trade function.
using
to differentiate buy and sell.
is there anything wrong with my conditions to open order?
shud i remove it and replace with the loop i used for close order function?
At this moment you have to check if there is already a trade open
before you open a trade you have to know if there is a trade open
still I can't see you have done the counting of trades
.
Take a look at the code of the Moving Average EA on your metatrader Station and see how it is done there ....