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
Don't paste your garbage to the code we have to do it step by step
We have done a loop in the open trades and there are several cases possible
we start this ea for the first time what will we see and what has to happen in that case ??
Don't paste your garbage to the code we have to do it step by step
We have done a loop in the open trades and there are several cases possible
we start this ea for the first time what will we see and what has to happen in that case ??
Hi deVries;
Sorry if I have done something wrong and that was not my intention.
When I ask what code you required I was in doubt if was your code updated per your request or my existing code where your code should be inside.
I know that I need to learn a lot of mql and without the help of people like you (RaptorUk, WHRoeder, Kronin,just to mention those that have shown the up most patience and interest to support people like me) for sure that I could become a copy guy, just taking others code.
So, moving on and regarding your third line of text ;
As far I understood we need to check if are any orders open and if yes which one are from our ea. First we need to set to zero the variables just to avoid the start from last values. Every time the loop executes we store the sum of in TotalOpenEA variable.From there we going forward identifying what type of orders are open (if any). Every time the loop executes we store each order sorted by order type in the proper variables (TotalBuy, TotalSell and so on).
Then we need to confirm what the value of the last lot just to limit the lot size to the proper lot size for the first order.
Luis
Assume "TotalOpenEA" is after the loop finished zero ( == 0 )
Then your intention is to open a trade some distance from price that moment
price can go up xx you buy
or price goes down xx you sell
I like to see your attempt to make that code it opens one buystop one sellstop
Assume "TotalOpenEA" is after the loop finished zero ( == 0 )
Then your intention is to open a trade some distance from price that moment
price can go up xx you buy
or price goes down xx you sell
I like to see your attempt to make that code it opens one buystop one sellstop
Hi deVries;
Back to "my lesson" here is what I've done:
A few things to work on...
A few things to work on...
Hi deVries,
So, what I've done was to open an order and try to close the opposite pending order once an op_buy or op_sell is open, but seems that's work....
Here is the code. Can't get why...
Please could you clarify me where I'm failing ?
How do you wanna make your program ????
If you don't understand what your coding is doing
Don't you have any idea what
information this piece of coding
is giving you,.....
you have to use it to open one new buystop and one new sellstop
you are only allowed to place one new buystop if total buytrades is 0 and total buystoptrades is also 0
and for sellstop you only allowed to place a new sellstop if total selltrades is 0 and total sellstoptrades is also 0
the code you see here can give you that information so use that information
till now you don't have to close opposite pending order