ctime definition and use please

Forums ProRealTime English forum ProOrder support ctime definition and use please

Viewing 4 posts - 1 through 4 (of 4 total)
  • #148897

    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

    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/

    1 user thanked author for this post.
    #148899

    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.

    1 user thanked author for this post.
    #148902

    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)

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