Exit position on current bar closing

Forums ProRealTime English forum ProOrder support Exit position on current bar closing

Viewing 4 posts - 1 through 4 (of 4 total)
  • #32006
    bsj

    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

    #32065

    For a long position have you tried

     

    Sell at market nextbaropen

     

    This command assumes you wish to close the entire position

    #32258
    bsj

    Hi Stratus6

    Thanks very much for your reply.

    But any coding for nextbarclose ?

     

    Thank you

    BSJ

    #32308

    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

     

     

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login