I need 86400 PreLoadBars

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #235872 quote
    teddy58
    Participant
    Average

    Hello everyone, if I work in the 1 second time frame, how can I query the price before 24 hours? According to the manual, a maximum of 5000 PreLoadBars are possible, I need 86400. Does anyone know a trick to achieve this?

    #235875 quote
    PeterSt
    Participant
    Master

    Hello Teddy,

    Maximum PreLoadBars is 10000.

    But looking at your text, to me it seems that you are looking for something else, – or that there just is no problem;
    86400 is obviously one day (assumed the instrument of concern is trading the full day) and asking for the price/bars prior to one day is a matter of looking back more days. However, for PRT Complete this is 200000 bars, in practice ~ 3 days. For PRT Premium you’d have 1M bars,  thus 15 (working) days.

    Whether you’d still need PreLoadBars depends on what you want to calculate. Thus, if you need to calculate an average etc. which you actively use the full last day, and the math of that average requires 2 days more prior to that last day, then it would still work. If you require more, it would be best to slowly increase your TimeFrame length. Like 2 seconds. Still not enough ? then 3. And so on.

    I hope this helps ?
    Regards,
    Peter

    Iván González thanked this post
    #235877 quote
    teddy58
    Participant
    Average

    Hello Peter, I would like to ask whether the previous day was positive or negative overall, and whether the period from 2:30 p.m. to 10 p.m. was positive or negative. That is the real task that needs to be solved. The position must be closed exactly at 090005, hence the time frame 1 sec. Best regards Peter 🙂

    #235879 quote
    GraHal
    Participant
    Master

    Your posts are a lot easier to read (for us) if you do not click on Quote before you type, or you not do whatever else you are doing which puts your posts inside that panel all stretched out etc?

    robertogozzi thanked this post
    #235881 quote
    robertogozzi
    Moderator
    Master

    To tell whether the day before was either Bullish or Bearish, you can use these two lines:

    Bullish = Dclose(1) > Dopen(1)
    Bearish = Dclose(1) < Dopen(1)

    to tell whether the time from 2:30 p.m. to 10 p.m was either Bullish or Bearish:

    IF Time = 143000 THEN
       Open230pm = open
    ENDIF
    IF Time = 220000 THEN
       Close10pm = close
    ENDIF
    BullishPM = Close10pm > Open230pm
    BearishPM = Close10pm < Open230pm
    Iván González and teddy58 thanked this post
    #235892 quote
    JS
    Participant
    Senior

    If you want to know whether this period 14:30 – 22:00 was positive or negative yesterday, you can use the following…

     
    //Calculate if previous period between PM 02:30 and PM 10:00 is positive or negative
    If OpenTime=143000 then
    PrevPM0230=PM0230
    PM0230=Close
    EndIf
    
    If OpenTime=220000 then
    PrevPM1000=PM1000
    PM1000=Close
    EndIf
    
    If PrevPM1000>PrevPM0230 then
    PrevPeriodPos=1
    else
    PrevPeriodPos=0
    EndIf
    teddy58 and robertogozzi thanked this post
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

I need 86400 PreLoadBars


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
teddy58 @teddy58 Participant
Summary

This topic contains 5 replies,
has 5 voices, and was last updated by JS
1 year, 6 months ago.

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