TIme Based Trading

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #104338 quote
    Ryan001
    Participant
    New

    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 quote
    GraHal
    Participant
    Master

    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

    c1 = (time = 123500)
    c2 = (time = 143500)
    
    IF c1 OR c2 THEN
    BUY 1 PERPOINT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    c3 = (time = 153500)
    
    IF c3 THEN
    SELL AT MARKET
    ENDIF
    Nicolas thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

TIme Based Trading


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Ryan001 @ryan001 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by GraHal
6 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/07/2019
Status: Active
Attachments: No files
Logo Logo
Loading...