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
I can't believe I am making these rookies errors... Annoys me! Yeah, I got it printing now and selecting the order. This is the code that is working in terms of the print - the lots are still not being closed out though? I have also pasted the journal messages below.
2013.07.31 11:13:52 2013.02.01 16:00 trendfishing_play_ground EURUSD,H1: Order Select returned the error of 0 // Not sure what is going on here?
c is a POSITION not a ticket number . . .
(facepalm - I obviously need a break from it!) ok sorted that and it's now selecting the order. This is the journal print now - "Close_Half_Order" error = 0? Thats the actual OrderClose function failing. It has nothing to do with the number of "000" after the second decimal place on the "lots to close is" part, is it?
(facepalm - I obviously need a break from it!) ok sorted that and it's now selecting the order. This is the journal print now - "Close_Half_Order" error = 0? Thats the actual OrderClose function failing. It has nothing to do with the number of "000" after the second decimal place on the "lots to close is" part, is it?
Braces, braces, braces . . . sometimes you need to use them, sometimes you don't.
The OrderClose() didn't fail . . .
so if the OrderType() is not an OP_BUY the last line will still be executed, hence the error 0 . . . add braces like this:
Hmmm, still does not want to close @ "Close_Half_Order" ? Not getting any error message either?
OP_BUY?
By the way, these braces do nothing other than confusing the situation . . .
I put in a pending order "OP_BUYSTOP" but I was under the impression that this would change when triggered to an "OP_BUY"?
I thought the order type would be "OP_BUY" if it had been triggered?
Afterall, I am only interested ONCE the order has been triggered?
Why are those braces confusing? Do you mean in terms of where the left parenthesis is? If so, it seems that is an individual thing, as I have been corrected on this multiple times?