how to loop Conditions

Questions about MultiCharts and user contributed studies.
DPTrade
Posts: 3
Joined: 12 Feb 2014
Been thanked: 1 time

how to loop Conditions

Postby DPTrade » 02 Jun 2016

Is there an example that shows how to loop Conditions.

For example, if Condition1=C>C[1] and C[1]>C[2] and C[2]>C[3].......C[n-1]>C[n];

Cant be programmed like this:

Inputs: NBars(10);
Vars: inc(0);

For inc=0 to NBars;
Begin
Condition1=C[inc]>C[inc+1];
End;

What am I missing?

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

Re: how to loop Conditions

Postby TJ » 04 Jun 2016

Is there an example that shows how to loop Conditions.

For example, if Condition1=C>C[1] and C[1]>C[2] and C[2]>C[3].......C[n-1]>C[n];

Cant be programmed like this:

Inputs: NBars(10);
Vars: inc(0);

For inc=0 to NBars;
Begin
Condition1=C[inc]>C[inc+1];
End;

What am I missing?
What is your intention?


Look up the keyword:

Highest

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

Re: how to loop Conditions

Postby TJ » 04 Jun 2016

see post 1 & 2
[FAQ] How to Post Codes (... so that people can read)
viewtopic.php?f=16&t=11713


Return to “MultiCharts”