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
    n79xtn79xt
    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
    NicolasNicolas
    Keymaster
    Legend

    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.
ProRealAI ProRealAI New

From idea to ProBuilder code in seconds.

Your coding copilot for ProRealTime™. Ask in plain English — get clean, ready-to-paste indicators, screeners and systems.

Available in 7 languages
Try ProRealAI

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 NicolasNicolas
9 years, 9 months ago.

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