Array Administration :-)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #186291 quote
    PeterStPeterSt
    Participant
    Master

    Avoiding a massive off-topic, a new topic for this :

     

    PeterSt wrote: Not that you asked for it, but notice that the first element of an array is [0] (not [1]).

     

    I actually almost always start from element 1 (I count elements myself, I only occasionally use LASTSET). I prefer using element 0 to store say, the date I created it, or last modified it, or any other info I may need, sometimes assembling numbers to combine conditions, such as:

    – first digit (1=only for LONG trades, 2=only for SHORT trades, 9=all trades allowed, not 0 because it would be dropped, being the first digit)
    – second to seventh digit for the last time I modified/added any element
    – and more, provided it does not exceed the supported length (which I don’t know, maybe 12+ digits)
    – then 5 digits for the number of elements

    so it may contain  9 09300 00212 (which is for ALL trades, LAST modified at 9:30am, containing 212 elements, combined is 909300000212).

    Nice !
    So this is all clear. But, I wonder what you store in such an array I am still a bit seeking for use-cases of the array. One small example may be telling without giving away your trader’s secrets ? – and shows easier than words ?

    I see the administrative application of your [0], but what is the administration about ?
    🙂

    #186301 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    As I said, when I want to know the BarIndex ID of the last addition, just to prevent further elements to be added before N bars have elapsed, in case I need to keep a tally of all trades entered.

    I could use a common variable, but I prefer using element 0. Im many cases I don’t need to use element 0 at all, still I may prefer starting from 1.

    #186442 quote
    NicolasNicolas
    Keymaster
    Legend

    Examples of use of arrays: (basically this is dynamic variable)

    array variables availability in ProRealTime: examples and discussions

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Array Administration :-)


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
PeterSt @peterst Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by NicolasNicolas
4 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/22/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...