
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 know it's a little scruffy! I have been playing around with it loads - so quickly put it back to where we were talking from? I assume you meant this whole part, right?
Erm . . . you need to take a step back, take a deep breath and read your code carefully, function by function, line by line . . . ask yourself "what am I trying to do here ?" and then check if your code is going to do that . . . for example:
This if test executes a comment if it is true ? ? ? ? ? ignoring that for a moment . . . how is OrdersTotal() a ticket number ? SELECT_BY_TICKET it's not even a valid Position if you used SELECT_BY_POS
I don't think this code is what is giving you your problem . . . even though it has some issues.
Yea - good spot, although that doesn't make any material difference to be honest.
Hmmm....
Yea - good spot, although that doesn't make any material difference to be honest.
Hmmm....
No it doesn't . . .
I don't think this code is what is giving you your problem . . . even though it has some issues.
I don't think you are showing the code that is creating the issue . . .
This is the Buy section - just spits out a "OP_BUYSTOP"
This . . .
. . . is a {} braces issue . . .
sort your indenting and you will "see" these issues quickly.
Yea, again good shout, I've gone through and sorted out a few of the indenting issues... still stuck with the same issues though? What other code are you insinuating it could be? I couldn't imagine it being from any other part of my coding...?
This is printing in the Journal during my for loop, where by, in the case of a pending Buy Stop Order, if the 60 EMA is > than the OrderStopLoss, it will close the pending order, open a new one with new SL (which is behind the 60EMA), adjust the take profit to entertain the 1:2 reward, and change the lots relative to the stop in points and my risk profile (say 2%).
So when this is all being done, the "Current Lots" which is "LotSize" custom variable within OrderSend works, it is sending off a lot size that is not correct for the server to receive? "0.18215"? Could this be an issue, despite the orders actually being sent through anyway - this question is more in connection to "could this be the reason why I cannot call "OrderType==OP_BUY"?
This is a longggggg process lol...