Trade only from 7.45 am untill 18.00 pm

Forums ProRealTime English forum ProOrder support Trade only from 7.45 am untill 18.00 pm

Viewing 8 posts - 1 through 8 (of 8 total)
  • #8779

    Hi, I want to set up automated trading, but I only want to do this with a strategy that is working daily from 7.45 AM untill 18.00 PM. Is this possible to set up? Thanks in advance.

    #8781

    Yes it is!

    Just add “if trading=1” to your condition to enter market

    cheers

    #8782

    There is another way to even exit at market if end time reach.

    Advise: those lines must be at first lines before code

    #8786

    Thanks guys! It works!

    #8804

    I’ve never tried, but is there a way to Conditionalise DEFPARAM FLATAFTER so that if a position in profit is open, it won’t close ?

     

    #8806

    Yes I need this too Grizzly, but something like the opposite …

    If position is at Loss < – L then don’t close until time T or Loss > 0

    Logic being that without above condition you may be closing near the bottom of a short term cycle / wave which may recover somewhat in  1 or 2 hours.

    Thanks

    GraHal

    #8808

    @grizzly and @GraHal

    With POSITIONPERF you can easily test if the actual positions are in profit. If so, make a conditional statement to close the basket or not accordingly to the present time.

    #8811

    Hi Nicolas, thanks

    Yes I use Positionperf a lot, it is very very useful.

    2 days ago one of my positions closed under a FlatAfter rule with a near £2,500 loss (it was only Demo!)  I checked after and it would have recovered a few hours later.

    So it was the above that prompted my question after Grizzly asking also.

    Its just that I have started using Strategies in French etc and so tweaking existing code (to add Positionperf) is not straightforward (I am english only), but I’ll get there with the help of google translate and learn French also! ha

    Cheers

    GraHal

     

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

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