Multiple Timeframes support available?

Forums ProRealTime English forum ProRealTime platform support Multiple Timeframes support available?

Viewing 15 posts - 16 through 30 (of 30 total)
  • #109828

    Do you have any documentation on how the server works in tick modes, because I have any issue while coding IF-THEN AND WHILE.DO in tick mode

    the following code is OK

    The following code does not change the programming logic, the WEND is moved a few line below,  but the execution is not correct and FutTime ss not updated accordingly

     

     

    #109841

    This is what the charts look like (100 ticks, DAX), left with the correct code, right with the incorrect one.

    I actually did not study the logic.

    Why did you want to move WEND?

    1 user thanked author for this post.
    #109862

    Hi Roberto, Nicolas

    I work with ticks that can range from 200 to 10000 ticks per bar.

    I neeed to get the price that was given @12h00:00 sharp, I do not want to get the price that would be the close at the end of the candle (on a 2000 tick candle, that could be delayed by more than 15 minutes easily).

    I can get that price after the candle is closed, but I need the price that was current @12h:00:00 and not the one current at the close of the bar instead.

    I go from problem to problem with the implementation of the graph tick mode that does not provide a correct CurrentTime.

    PRT does provide Time, but it does not authorize to store a price value sampled at a precise Time.

    I made a test moving the WEND as a possible kludge but it doesn’t work better.

    I am stuck.

    #109867

    Even using a 1-tick chart there’s no guarantee that there will be a 12:00:00 tick, in the case there isn’t one, the price valid at that time is the previous tick’s price.

    It’s the previous price when the opentime is > 12:00:00 and the previous opentime is < 12:00:00.

    If there’s a 12:00:00 tick then you have it without much trouble.

    2 users thanked author for this post.
    #109903

    ThanksRoberto.

    Let’s say I have a bar starting at @11:55:25 and closing @12:17:54.

    I am able to retrieve the price value at the tick just after 12:00:00 (or just before), that is not a problem. My problem is to store that value for good into a variable, and keep it unchanged.

    I need to use the price that was @12:00:00 later in the afternoon, let say at 16:43:45 or whatever else time in the afternon.

    All my tests show that I will not store the value of the price @12:00:00, but PRT will retain only the price of the bar close (i.e. the close @12:17:54). And this is biased data for me.

    #109910

    My problem is to store that value for good into a variable, and keep it unchanged.

    It is not possible as I stated in my last post in this thread. Each variable are reset on new received tick. So even with your while/wend loop inside a candle you couldn’t retrieve the Close price at a precise Time inside it. If the code is not read precisely at the exact time of the Close of the candlestick’s timeframe you want to get, then you can’t get it.

    #109913

    If you do like I suggested and store that price in a variable, you can retrieve it whenever you want:

    edit warning:   The above code has been changed, I replaced OpenTime with Time and close with close[1] to reflect the changes suggested in the following posts.
    Roberto

    1 user thanked author for this post.
    #109921

    Above linked as Log 174 in here

    Snippet Link Library

    2 users thanked author for this post.
    #109930

    Sorry about my snippet of code, at line 3 CLOSE shall be replaced with:

     

    1 user thanked author for this post.
    #109932

    Hi Roberto.

    Correct close price @13:00:00 is 13380,7

    With your code just modified for a few lines to sample at another time, and to print the time value.

    I get the value of the close bar that closes way after 13:00:00 more that 15 minutes later, and is biased data

    See attached

    BTW: In the 1 minute chart info is the close price of 13:00:59.9999 (given the code, there is a 1 minute offset expected), but this is not important. I could be fixed easily.

     

    #109935

    It’s because OpenTime is the time a candle opens, replace it with TIME, instead.

    #109936

    So basically with The code you provided  Roberto,

    I can get two values on the 2000 tick bar chart, open or close of the bar that is current @<time to sample>.

    In my case the tick bar duration is often more than 30 minutes, and both values might be totally incorrect vs. the actual price @<time to sample>.

     

    #109938

    Being totally incorrect does not exist!

    IT IS correct according to the TF or Number of TICKS you selected. If you want a greater accuracy you need to decrease the number of ticks, up to 1, still in this case, as I wrote some posts ago, there can be ticks with no price movement (actually there are no ticks).

    At any one time, no matter whether you are using time-base or tick-based charts, in case there is no movement (ticks) at the time you are monitoring, the correct value for that time is the previous known one!

     

    #109939

    A further suggestion to reach a greater extent of accuracy.

    Use 1-tick charts, then count ticks yourself, say 100, 200 or 1000 to make your decisions. Of course your charts will change very fast!

    #109998

    Yes, that would be doable if there were no graph constraints.

    But I also need visuals in 200-10000 tick periods. ANd with a very low number of ticks displayed, 1 would get a graph that is too fast.

    Like: if I had this issue on a 1 hour graph, I don’t want to kludge it by displaying a 5 second or a 1 minute graph, this without seeing any signal on my hourly chart.

     

Viewing 15 posts - 16 through 30 (of 30 total)

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