How to use ArraySort and unset?

Forums ProRealTime English forum ProOrder support How to use ArraySort and unset?

Viewing 8 posts - 1 through 8 (of 8 total)
  • #186254
    CKW

    Hi,

    I have an issue with “ArraySort($MAArray, ASCEND)” in Pro order.

    The same with Unset, the way I code is not correct?  Please advise.

    e.g.

    br

    CKW

     

    #186256

    Rewrite those few lines trying not to type unsupported characters.
    If the error is still reported, then it’s an error in one of the lines prior to 248.

     

    #186260

    @CKW, if that is in ProOrder indeed (hence Strategy Code and not an Indicator) … both ArraySort and Unset are not supported there. You can see that by the syntax highlighting. So do you ?

     

    https://www.prorealcode.com/topic/array-variables-availability-in-prorealtime/page/12/#post-185587

    #186263
    CKW

    Hi PeterSt, Robertogozzi,

    Thanks.

    @CKW, if that is in ProOrder indeed (hence Strategy Code and not an Indicator) … both ArraySort and Unset are not supported there. You can see that by the syntax highlighting. So do you ?

    https://www.prorealcode.com/topic/array-variables-availability-in-prorealtime/page/12/#post-185587

    Thanks for telling that Pro order not support both ArraySort and unset :). There is no warning /error description saying that this syntax are not supporting.

    br

    CKW

     

     

    #186268

    There is no warning /error description saying that this syntax are not supporting.

    Hmm …

    Paste this over the standard code in a new strategy :

    You should see that warning sign at the bottom line. If not, I wonder what could be going on.
    But watch out. The below code (see attached) shows the lines pasted from your post. And now the syntax error does *not* show, BUT it appears on line 1 you see there (I copied the line numbers from the code you showed).

    This makes Roberto’s remark correct in the first place because now indeed the message appears as with you. Btw hint : this is most probably about an If/Endif mismatch.
    But the ArraySort and Unset are still not supported … 🙁

     

    #186270
    PS:

    $MAArray[1] = DMAS20

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

    #186276

    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).

     

     

    1 user thanked author for this post.
    #186466

    ArraySort and Unset instructions are about to be possible with IG accounts this week.

Viewing 8 posts - 1 through 8 (of 8 total)

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