How to keep track of profitable trades within a specific time period?

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

    Hi, I’m looking for some syntax suggestions on how to place an order like this:

    IF executed trades between times 080000 - 120000 have been profitable (i.e. >0 profit), then stop executing further trades for the day. 
    
    ELSE, continue executing trades as normal as defined by the strategy

    I have a rough idea on how to code it, but I do not know what specific ProRealTime functions to use here to keep track of the number of profitable trades executed.

    Would appreciate any help, thanks

    #24188 quote
    Nicolas
    Keymaster
    Master

    You could try to store the barindex of 080000 and do the same for 120000. Then you can do a loop through the last tradeindex and find trades that occurred between these 2 start and stop barindex you previously stored in variables.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

How to keep track of profitable trades within a specific time period?


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
n79xt @n79xt Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
9 years ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 02/04/2017
Status: Active
Attachments: No files
Logo Logo
Loading...