Only one trade per day

Forums ProRealTime English forum ProOrder support Only one trade per day

Tagged: 

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

    Only one trade per day.

    My auto system trades between 09h00 & 15h00 and can take several trades per day.

    I now wish to only take one trade per day, the first one.

    How do I code this requirement?

    #222663

    As posted in https://www.prorealcode.com/topic/help-with-limiting-strategy-to-one-trade-per-day/#post-143705, you can use

    then you can add OTD to your entry conditions, like the example in the link above.

     

    1 user thanked author for this post.
    #222676

    Thank you so much Roberto.

    I could hardly believe the speed of response !

    OTD worked like a charm.

    #222683

    Spoke too soon.

    OTD worked perfectly on back test but when live didnt enter trade when it should have.
    I have taken this up with PRT as per norm but no solution as yet. Any suggestions ??

    #222703

    These 2 snippets seem to work as expected (one uses OTD, the other one doesn’t):

    anyway, I’ll keep testing them next Monday.

    #222717
    JS

    Hi @897148

    Note that the TradeIndex(1) gives both a value when a position is opened and also when a position is closed…

    With “If OnMarket and OTD” you know that a position was opened yesterday (or earlier) that is currently still open…

    With “If NOT OnMarket and OTD” you know that a position was closed yesterday (or earlier) and that a position can now be opened again…

    As Roberto also points out, use the OTD in combination with NOT OnMarket….

    If Conditions and NOT OnMarket and OTD then

    “Buy or SellShort”

    1 user thanked author for this post.
    #222823

    My two snippets work correctly, the one using OTD opens only 1 trade per day, while the other one opens tens of trades.

     

    1 user thanked author for this post.
    #222846

    I need to give a very big thankyou to Roberto and JS.

    The OTD and Not OnMarket worked perfectly today when I ran live along with the original, multi trade version which took two trades in the allocated time but OTD only one as desired.

    I still find it hard to believe how helpful some people are. Restores some much needed faith in mankind .

    2 users thanked author for this post.
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