ctime definition and use please

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #148897 quote
    Kovit
    Participant
    Senior

    Hello apologies for the noob question, please could someone clarify when you would use ctime as I’m looking at it in a strategy but when backtesting I can see trades outside of the time window specified in ctime?  How does it differ from using the defaram before and after if at all ? Thanks again.

    #148898 quote
    JC_Bywan
    Moderator
    Master

    ctime is not a keyword in prt language, it’s probably someone’s chosen name for a “c”ondition on “time”, there’s no particular clarification to bring on how it would be used. At most, when reading the code, there’s only seeing what it does within this specific code as intended by its author. Most likely it was used within an “if … then” statement for a specific purpose and that doesn’t necessarily mean trades can’t exist outside of it (example: used for entry, but not necessarily for exit before it ends).

    Color code in the code editor can help to see quickly what’s part of the language and what’s just a variable. To see if it’s a keyword, typing the word in the “terms search” box there can help too: https://www.prorealcode.com/prorealtime-documentation/

    Kovit thanked this post
    #148899 quote
    Francesco
    Participant
    Veteran

    Maybe if you post the code we can help you to understand how and why it works; as noobywan said it’s probably a term to indicate the variable of the time into the strategy.
    When you use the variable “ctime= time>x and time<x” you choose the time range the system have to work with (for entries, exit etc..); defparam flatbefore and flatafter works in order to start or stop the strategy at x time.

    Kovit thanked this post
    #148902 quote
    Kovit
    Participant
    Senior

    Thanks guys I did have a search on the code index and couldnt see it so that would make sense that it’s someones own condition.

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

ctime definition and use please


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Kovit @kovit Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Kovit
5 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/29/2020
Status: Active
Attachments: No files
Logo Logo
Loading...