Building a calendar function – Problem with CALL command

Forums ProRealTime English forum ProBuilder support Building a calendar function – Problem with CALL command

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

    Hi,

    Since PRT has no possibility of grabbing data and using that feature for instance for a calendar, I have been building one that converts data from a common site to a PRT code. This offers the possibility to enable / disable specific events based on currency, impact and dates.

    There are some issues though that I’ve tried to circumvent. In this method I have a MAIN indicator that updates on lastbar and only if it is truly the lastbar listed through a date check.

    The limitation in PRT is 10.000 rows per indicator. As you can not use STRINGS in PRT, I can’t just shuffle around data and read it as strings. So all data must be formatted with PRT code (IF conditions) and split into months . This reaches about 5.000 lines to be able to enable / disable currencies, dates and based on market impact.

    My problem is that I want to create a seamless calendar. Meaning that Month1 and Month2 will just keep flowing.

    My first problem is that if I try to use the CALL command from the MAIN indicator and pass shown number of events in calendar for Month1 (lets say 20) to calendar for Month2 so it continues from row 21, only calendar Month2 will plot. Not calendar for Month1.

    MAIN -> ROWS = CALL “MONTH1″[ROWS]

    MAIN -> ROWS = CALL “MONTH2″[ROWS]    —-> Only this will plot in the indicator from the row that is passed from MONTH1.

    If I turn MONTH1 and MONTH2 around, only the latter, MONTH2 will plot.

     

     

    Second problem is if I try to CALL MONTH2 from MONTH1 and just pass on ROW:

    MAIN – > CALL “MONTH1″[0]

    MONTH1  – > CALL “MONTH2″[ROWS]

     

    The same problem arises. Only data listed in MONTH2 is shown.

    A simple test with CALL command and only one DRAWTEXT in MONTH1 and MONTH2 seems to work fine. It is only when you start loading up more DRAWTEXT data in both MONTH1 and MONTH2 that it stops working and only shows MONTH2 data.

     

    Can someone explain what is going on? I would very much like to integrate a calendar function that I don’t have to swap every month, but works seamless.

    Thanks.

     

     

    #142953

    I’ve added a small image of what it can look like with a workaround that doesn’t make it very user friendly to the same level as the functions above.

    The time is corrected for your own UTC time. Changes will increase or decrease the time of the event. The plus next to the date shows that the event occurs +1 day (or -1) depending on your UTC time.

    For instance if event is listed as occurring on the 31st at 01.00 and carries a plus behind the date, it actually occured at UTC-0 at 23.00 on the 31st as my setting is UTC+2. That can be changed in the indicator main settings.

    I would much rather simplify the indicator so I have only one MAIN indicator and calling the DATA of MONTH1 and MONTH2 etc with the CALL command. So my query still remains – why doesn’t CALL function work when plotting larger amount of text and only the latest one plots (refresh?) the indicator?

    Let me know if you are interested in the calendar as an indicator. It requires manual updates with an excel script. But it is doable.

    Thanks.

    #142969

    I never reached so much text instructions in the same code, so I don’t what is happening, i dont see any logic in what happens here.

    By the way, this news calendar indicator looks awesome! Congratulations for the work done! While I don’t know how you have coded it, I think that it would be much easier to code it using arrays (PRT v11).

     

    #143005

    Thanks Nicholas.

    I couldn’t agree more with you. PRT 11 is such a step up. Problem is that I can’t use it with IG. My latest information from IG (someone who seems to know what they are talking about) tells me Q1 2021. Let’s hope they can keep that promise…

    I’ve decided to simplify the calendar and make it easier. I’m considering sharing it with the community and will post it for your consideration. It requires manual install every month (1 month per indicator). I’ll probably update in batches of 3 (Quarterly).

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