Array Administration :-)

Forums ProRealTime English forum ProOrder support Array Administration :-)

Viewing 3 posts - 1 through 3 (of 3 total)
  • #186291

    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

    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

    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)

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