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
Yea - I literally just figured that out when I removed the for loop. Am I right in saying that if I track the OrderTicket number from when it is first selected, once the OrderClose has done its thing and it returns true, then I could verify this with the OrderTicket number as they will be different - thus breaking the loop and wait until another new order comes through?
Not entirely sure how to write that, but is that roughly on the right lines?
You don't need to exit the loop . . . unless the remaining part of the Order has a new ticket number ? do you know if it does ?
The issue with saving this information in a variable or array is that if the EA stops by design or MT4 crashes you have lost your information and you can't pick up from where you left off. You might be able to do something with magic numbers . . otherwise you will have to get messy and start saving info to files . . .
Hmmm... Ok well I just printed out the order details after the OrderClose==true.... The OrderTicket numbers are identical, from when I first put the trade on to after I have closed half out... Any idea why it won't close half off as soon as Bid is >= to exit price as well? It seems to go far enough, but it only seem to close it on a pull back (I am quickly running a test on a known set-up repeatedly.)
If they're all the same ticket number, how can I work with that to stop trying to continuously close halves consecutively? Just wanting it to close half once...
Hmmm... Ok well I just printed out the order details after the OrderClose==true.... The OrderTicket numbers are identical, from when I first put the trade on to after I have closed half out... Any idea why it won't close half off as soon as Bid is >= to exit price as well? It seems to go far enough, but it only seem to close it on a pull back (I am quickly running a test on a known set-up repeatedly.)
Can you show a little more of the log/journal, what is the Bid the tick before half the Order is going to closed ? All we can see from what you have printed is what Bid was when half the Order was about to be closed. What Strategy Tester mode are you using ? every tick or Opening prices ?
If they're all the same ticket number, how can I work with that to stop trying to continuously close halves consecutively? Just wanting it to close half once...
Ok - well, the only other option is to put two orders in with two different exit prices... the only problem I have with that is this:
"if(OpenOrdersThisPair(Symbol())==0)"
It will only let me put 1 order in at a time... If I remove that, then there will be an unlimited number of trades being put into the market on any one set-up... I'm hoping you have experience with how I can allow 2-3-4 orders in on any ONE isolated set-up idea?
I can have up to a maximum of 4 exits per trade set-up
Ok - well, the only other option is to put two orders in with two different exit prices... the only problem I have with that is this:
"if(OpenOrdersThisPair(Symbol())==0)"
It will only let me put 1 order in at a time... If I remove that, then there will be an unlimited number of trades being put into the market on any one set-up... I'm hoping you have experience with how I can allow 2-3-4 orders in on any ONE isolated set-up idea?
Can you show a little more of the log/journal,
Can you show a little more of the log/journal, what is the Bid the tick before half the Order is going to closed ? All we can see from what you have printed is what Bid was when half the Order was about to be closed. What Strategy Tester mode are you using ? every tick or Opening prices ?
I am using every tick. The highlighted part above; how do I check that? I don't understand why, but sometimes not everything will print out - Yet the orderclose function works, but the print doesn't... Really frustrating, as it's confusing me. But never mind that, the print out is pretty much everything I pasted above?
The only difference being, is that I also have a relentless amount of "OrderModify error 1" - which I have yet to figure out...
I am using every tick. The highlighted part above; how do I check that? I don't understand why, but sometimes not everything will print out - Yet the orderclose function works, but the print doesn't... Really frustrating, as it's confusing me. But never mind that, the print out is pretty much everything I pasted above?