Arrays, and previous arrays

Forums ProRealTime English forum ProBuilder support Arrays, and previous arrays

Viewing 5 posts - 1 through 5 (of 5 total)
  • #173018

    Hi,

    If I used an array to log the bar index and price of a pair of MAs if they were to cross, is it possible to use the array function to find the price of the previous crossing, if so, how would I write it?

    TIA

    RR

    #173019

    Arrays are not historicized, so you cannot see the value retained the previous bar for element, say 5, of the array:

    You need to store each crossover in an array element:

    Count will retain the number of crossovers and each $CrossBar[] element will retain the barindex of the crossover. You

    #173050

    Thank you very much, Roberto.

    RR

    #173052

    Sorry for the final YOU, I had nothing more to write.

    I must have have pressed some unwanted dictionary word on my mobile 🙂

     

    #173102

    If you only want to know the price and barindex of the last crossing then you don’t need to use array variables. However if you want to store the price or barindex of all historical crosses then you do need to use array variables.

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

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