A question about "New N-Day HiLo"  [SOLVED]

Questions about MultiCharts and user contributed studies.
Sunny
Posts: 6
Joined: 30 Aug 2013
Has thanked: 1 time

A question about "New N-Day HiLo"

Postby Sunny » 12 Sep 2013

Hi,
I'm new in multichats. I'm confused by an indicator in Powerlanguage Editor:New N-Day HiLo.

Code: Select all

inputs:
NumDays( 7 ),
NewQualDays( 0 ),
OldQualDays( 0 ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ),
var5( 0 ),
var6( false ),
var7( false ),
var8( 0 ),
var9( 0 ) ;
arrays:
arr0[ 12, 100 ]( 0 ),
arr1[3]( 0 ) ;
Value1 = RS_DailyDataArray( NumDays, arr0, var0, arr1 ) ;
condition1 = CurrentBar = 1 or Date <> Date[1] ;
if condition1 then
begin
Value2 = RS_Extremes( NumDays, arr0, var0, var1, var2,
var3, var4 ) ;
var5 = NumDays - OldQualDays ;
var6 = var2 <= var5 and var2 > NewQualDays ;
var7 = var4 <= var5 and var4 > NewQualDays ;
end ;


condition1 = var6 and High > var1
and IffLogic( arr0[ 12, var0 ] = arr1[3], arr1[1] <= var1, true );
if condition1 then
begin
if Date <> var8 then
Plot1( High, "NewNDayHi" ) ;
var8 = Date ;
end
else
begin
condition1 = var7 and Low < var3 and IffLogic( arr0[ 12, var0 ] =
arr1[3], arr1[2] >= var3, true ) ;
if condition1 then
begin
if Date <> var9 then
Plot2( Low, "NewNDayLo" ) ;
var9 = Date ;
end ;
end;
Plot3( var1, "HiLine" ) ;
Plot4( var3, "LoLine" ) ;
if var6 then
SetPlotWidth( 3, 2 ) ;
if var7 then
SetPlotWidth( 4, 2 ) ;
Does it mean whatever bartype I use, the "HiLine" indicates the highest line of 7 days and "LoLine" indicates the lowest line of 7 days?
Thanks.

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

Re: A question about "New N-Day HiLo"

Postby TJ » 12 Sep 2013

Hi,
I'm new in multichats. I'm confused by an indicator in Powerlanguage Editor:New N-Day HiLo.
::
Does it mean whatever bartype I use, the "HiLine" indicates the highest line of 7 days and "LoLine" indicates the lowest line of 7 days?
Thanks.
Have you tried?
What is your confusion?

Sunny
Posts: 6
Joined: 30 Aug 2013
Has thanked: 1 time

Re: A question about "New N-Day HiLo"

Postby Sunny » 13 Sep 2013

Yes, I've tried.The confusion is when I changed the "NumDays" to other numbers, the "HiLine" and "LoLine" seem unchanged.

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

Re: A question about "New N-Day HiLo"

Postby TJ » 13 Sep 2013

Yes, I've tried.The confusion is when I changed the "NumDays" to other numbers, the "HiLine" and "LoLine" seem unchanged.
Can you give us a specific example that you tried?
What is the instrument? What is the chart resolution? What is the NumDays?
Did you count the days on the chart? How many days did you get?
Can you post a screenshot?

Sunny
Posts: 6
Joined: 30 Aug 2013
Has thanked: 1 time

Re: A question about "New N-Day HiLo"

Postby Sunny » 13 Sep 2013

Hello TJ, I'm sorry I misunderstood this indicator. I thought it can be any number before. Now my understanding of this is the "NumDays" is up to 7. Am I right?

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

Re: A question about "New N-Day HiLo"

Postby TJ » 13 Sep 2013

Hello TJ, I'm sorry I misunderstood this indicator. I thought it can be any number before. Now my understanding of this is the "NumDays" is up to 7. Am I right?
The "Input" for an indicator is for you to customize the variable to suit your analysis.
ie. you can enter any number you want, up to the computer or the indicator's specified limit. In this indicator, the limit is set at 100.

Sunny
Posts: 6
Joined: 30 Aug 2013
Has thanked: 1 time

Re: A question about "New N-Day HiLo"

Postby Sunny » 13 Sep 2013

Hello TJ, thanks for reminding me. This indicator can operate normally. Actually, the high and low lines are unchanged when I compiled it after changed the inputs. Only if I remove the indicator first and then insert it again, the lines display properly.

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

Re: A question about "New N-Day HiLo"  [SOLVED]

Postby TJ » 13 Sep 2013

Hello TJ, thanks for reminding me. This indicator can operate normally. Actually, the high and low lines are unchanged when I compiled it after changed the inputs. Only if I remove the indicator first and then insert it again, the lines display properly.
You do not have to recompile the indicator to change the input value. Simply double click on the indicator, a window will open for you to change the setting.

Sunny
Posts: 6
Joined: 30 Aug 2013
Has thanked: 1 time

Re: A question about "New N-Day HiLo"

Postby Sunny » 13 Sep 2013

Thanks for the tip!

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

Re: A question about "New N-Day HiLo"

Postby TJ » 13 Sep 2013

Thanks for the tip!
You are welcome.

Sunny
Posts: 6
Joined: 30 Aug 2013
Has thanked: 1 time

Re: A question about "New N-Day HiLo"

Postby Sunny » 13 Sep 2013

Hello TJ, I have another question. My char starts from April, 2010, but the high and low lines don't displayed until July, 2010. I don't know why.

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

Re: A question about "New N-Day HiLo"

Postby TJ » 13 Sep 2013

Hello TJ, I have another question. My char starts from April, 2010, but the high and low lines don't displayed until July, 2010. I don't know why.
It depends on the data required to make the calculation. If you are looking back 100 days, that would require 3 months of data before the first line is drawn.

For further explanation, please look up:

MaxBarsBack


Return to “MultiCharts”