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
Globals are static.
I make mine refresh at the close of each order so the data gets deleted.
Global but not static. Well here is my closing sequence.
I'm having some issues with this too be honest, but it's after trying to adjust a previously built closing sequence with some new closing triggers, with the 5th order only half of it gets closed, I think it's something I can deal with though however, the profit problem has been bugging me for some time.
Yeah thats why you're having problems. I would recommend doing the OrderClose within the same OrderSelect_Loop which you performed the OrderProfit()+ calculations.
I would use local variables for these. Global variables save their values from start-to-start and requires manual reset of the globals.
Global but not static.
Well here is my closing sequence.
I'm having some issues with this too be honest, but it's after trying to adjust a previously built closing sequence with some new closing triggers, with the 5th order only half of it gets closed, I think it's something I can deal with though however, the profit problem has been bugging me for some time.
Yeah thats why you're having problems. I would recommend doing the OrderClose within the same OrderSelect_Loop which you performed the OrderProfit()+ calculations.
I would use local variables for these. Global variables save their values from start-to-start and requires manual reset of the globals.
I use comment to monitor the values and they seem to be resetting.
Please note.
If you still think I should do as suggested then I'll try it.
OK, this is the code to close the Buy, you were talking about OP_SELL earlier . . . please show where you use OOPrS to determine if the Order should be closed or not and also how that then makes the close happen . . . you have a time element too . . . maybe that is the issue ?
I realise this, but I spotted the issue with buy orders first, as they were the first to be carried out, my sell code is pretty much identical. The close sequence is held within the FunctionCall (int direction)
You need to do a little more than that. Try the following ... use only 1 order select loop and no-globals.
Try giving that a shot.It'll refresh every-time you need it.