Send Array Bi-Dimensional in function as parameter

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Send Array Bi-Dimensional in function as parameter

Postby turbofib » 13 Apr 2018

hi,

i try to do it:
Array:Signal[7,2](0);

EntryPosition_NetProfitIntraBar_Function(SIgnal);
EntryPosition_NetProfitIntraBar_Function

input:Signal[X][Y](NumericArrayRef);

but i get this error :

------ Compiled with error(s): ------
'(' Expected
line 1, column 300
Attachments
Immagine.png
(2.01 KiB) Downloaded 474 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Send Array Bi-Dimensional in function as parameter

Postby TJ » 13 Apr 2018

Where did you get this "EntryPosition_NetProfitIntraBar_Function"?
What does it do?

If this is a coding question, please post your codes.

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Send Array Bi-Dimensional in function as parameter

Postby turbofib » 13 Apr 2018

It do a loop in array to print value

MAZINGUER
Posts: 75
Joined: 06 Jan 2017
Has thanked: 9 times
Been thanked: 25 times

Re: Send Array Bi-Dimensional in function as parameter

Postby MAZINGUER » 13 Apr 2018

Hello turbofib,
I think this can be
-First in the definition of the function you have put
input: Signal [X] [Y] (NumericArrayRef);
and it should be
input: Signal [X, Y] (NumericArrayRef);
- Second: when defining an imput in a normal function passed by reference ... in the study you have to define it as a variable and not as an array. I do not know if in functions with arrays it will be the same.
Last edited by MAZINGUER on 13 Apr 2018, edited 1 time in total.

MAZINGUER
Posts: 75
Joined: 06 Jan 2017
Has thanked: 9 times
Been thanked: 25 times

Re: Send Array Bi-Dimensional in function as parameter

Postby MAZINGUER » 13 Apr 2018

The truth is that I've been doing things with arrays for a while now but it's getting very complicated for me.
There is not much material about them to learn


Return to “MultiCharts”