Push values in Array

Questions about MultiCharts and user contributed studies.
masber2000
Posts: 29
Joined: 15 Aug 2012
Has thanked: 2 times

Push values in Array

Postby masber2000 » 11 Apr 2023

Hello-

I'm looking for a keyword/function like fill_array(array1,0), to force an array [1 dimension] to push values forward, i.e. array1[1] = array1[0], array1[2] = array1[1]........etc. Is there a keyword or pre-built function that does this?

I'm currently pushing values forward by using a counter, and want to make the process more efficient.

TY,

mb2k

User avatar
Kate MultiCharts
Posts: 575
Joined: 21 Oct 2020
Has thanked: 7 times
Been thanked: 144 times

Re: Push values in Array

Postby Kate MultiCharts » 12 Apr 2023

Hello mb2k,

Here's a sample:

Code: Select all

input: Arr[Length](NumericArrayRef); var: Counter(0); for Counter=Length DownTo 1 Begin Arr[Counter] = Arr[Counter-1]; End; Array_Shift = 1;
Push Values in Array.png
(123.07 KiB) Not downloaded yet


Return to “MultiCharts”