How to Force DOpen value of a specific time

Forums ProRealTime English forum General trading discussions How to Force DOpen value of a specific time

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

    Hello Traders

    South Africa trade starts at 083000
    I’d like to use the ‘Open’ at that specific time as a parameter within my code.
    (Much like the DOpen, Kind of creating my own DOpen)

    How do I do that?

    Thanks for your advise.

    #11036

    I’m not sure what you mean by your own DOpen (Dopen() is used to get the price of a previous daily open) but I’m guessing you want this?

    // No positions will open before this time so only at or after this time but make sure you have the time zone on the platform to South Africa and that this code is at the beginning of your system 
    DEFPARAM FlatBefore = 083000 

    // Close all positions and don’t open any positions after
    //DEFPARAM Flatafter = ??????

    If that’s not what you’re after maybe a more specific example would help.

    #11045

    Hi dwgfx
    Thank for your comment.

    What I want to achieve is to create a ‘constant variable’ based on the ‘Open’ value of the candlestick at the exact time of 083000

    Thanks,
    A.

    #11046

    I came up with this:

    But maybe there is a better way of coding..?

     

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