TIme Based Trading

Forums ProRealTime English forum ProOrder support TIme Based Trading

Viewing 2 posts - 1 through 2 (of 2 total)
  • #104338

    Morning all,

    First day using ProRealCode so apologises if im missing something glaringly obvious, Im looking to back test an extremely simple idea to get me going.

    Basically I want to programme a simple system that buys XYZ at 1235BST (london time) AND 1435BST and sell both out at 1535BST

    I have been looking through the tutorials and the forum but cant seem to find anything.

    Again, sorry if this is an obvious question

     

    Thanks in advance

     

     

    PS. This is how basic I was expecting it to be..

     

    // Conditions to enter long positions
    c1 = (time = 1235)
    c2 = (time = 1435)

    IF c1 OR c2 THEN
    BUY 1 PERPOINT AT MARKET
    ENDIF

    // Conditions to exit long positions
    c3 = (time = 1535)

    IF c3 THEN
    SELL AT MARKET
    ENDIF

    #104343

    Please use the Insert PRT Code blue button as the code looks so much better and is easier to read 🙂

    Good 1st  job … your code only needed seconds adding to comply with PRT terms etc

     

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)

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