bsjParticipant
New
Hi All,
Any one help me out how to put a code for exit the remaining position on current bar closing time or next bar opening time.
Thanks in advanced.
BSJ
For a long position have you tried
Sell at market nextbaropen
This command assumes you wish to close the entire position
bsjParticipant
New
Hi Stratus6
Thanks very much for your reply.
But any coding for nextbarclose ?
Thank you
BSJ
Without thinking of the coding niceties, sorry … and I can’t see the Insert PRT Code button anyway, sorry mods.
Record barindex of current bar as currentbarindex and then use barindex= currentbarindex +1, conditions will then be checked at close of currentbarindex +1 and exit at next bar open (same price as previous bar close / currentbarindex +1).
Ha … would have been easier to have coded it, maybe!? Note to self: Code solutions or leave helping to somebody who can?? Lesson learnt for me! 🙂
If I could only see the Insert PRT Code button?? Do we have to live with this and I find my own work around (Nicolas or Mods) or is there a fix coming along please?
GraHal