BOXSIZE value reference  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
sleonov1
Posts: 3
Joined: 17 Jun 2014
Has thanked: 1 time

BOXSIZE value reference

Postby sleonov1 » 17 Jun 2014

I apologize for the lame question... but how one can reference the BOXSIZE value from the script in P&F charts?

Thank you.

User avatar
Alex MultiCharts
Posts: 194
Joined: 09 Aug 2013
Has thanked: 43 times
Been thanked: 76 times

Re: BOXSIZE value reference  [SOLVED]

Postby Alex MultiCharts » 17 Jun 2014

Hello sleonov1,

Please see the script sample below:

Code: Select all

protected const int FID_CHART_PFIGURE_BOXSIZE = 1087;
protected const int FID_CHART_PFIGURE_REVERSAL = 1088;
protected const int FID_CHART_PFIGURE_BASIS = 1089;
protected const int FID_CHART_RENKO_BOXSIZE = 1091;
protected const int FID_CHART_LINE_BREAK_COUNT = 1092;
protected const int FID_CHART_KAGI_REVERSAL = 1093;
protected const int FID_CHART_KAGI_REVERSAL_TYPE = 1094;
protected const int FID_CHART_KAGI_REVERSAL_PERCENT = 1095;
protected const int FID_CHART_BREAK_ON_SESSION = 1098;
protected const int FID_CHART_RENKO_SHOW_FANTOM_BAR = 1106;
protected const int FID_CHART_RENKO_CALC_HIGH_LOW = 1107;
protected const int FID_CHART_RENKO_REAL_OPEN = 1108;
protected const int FID_CHART_RENKO_BOXSIZE_TYPE = 1109;

protected override void CalcBar()
{
double _BoxSize = Convert.ToDouble(Bars.Request.Resolution.Attributes[FID_CHART_PFIGURE_BOXSIZE]);
int _Reversal = Convert.ToInt32(Bars.Request.Resolution.Attributes[FID_CHART_PFIGURE_REVERSAL]);
// to do
}
[Added to NET FAQ]

User avatar
JoshM
Posts: 2099
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1526 times
Been thanked: 1502 times
Contact:

Re: BOXSIZE value reference

Postby JoshM » 09 Aug 2014

Please see the script sample below:

Code: Select all

protected const int FID_CHART_PFIGURE_BOXSIZE = 1087;
protected const int FID_CHART_PFIGURE_REVERSAL = 1088;
protected const int FID_CHART_PFIGURE_BASIS = 1089;
protected const int FID_CHART_RENKO_BOXSIZE = 1091;
protected const int FID_CHART_LINE_BREAK_COUNT = 1092;
protected const int FID_CHART_KAGI_REVERSAL = 1093;
protected const int FID_CHART_KAGI_REVERSAL_TYPE = 1094;
protected const int FID_CHART_KAGI_REVERSAL_PERCENT = 1095;
protected const int FID_CHART_BREAK_ON_SESSION = 1098;
protected const int FID_CHART_RENKO_SHOW_FANTOM_BAR = 1106;
protected const int FID_CHART_RENKO_CALC_HIGH_LOW = 1107;
protected const int FID_CHART_RENKO_REAL_OPEN = 1108;
protected const int FID_CHART_RENKO_BOXSIZE_TYPE = 1109;
Could you provide the full list of Keys or tell me where I can find these?

Looping through the `Attributes` dictionary gives me on MultiCharts .NET64 Version 8.8 Release (Build 8365) the following values:

Code: Select all

foreach (var key in Bars.Info.Resolution.Attributes.Keys)
{
Output.WriteLine("Key: {0}, value: {1}",
key.ToString(),
Bars.Info.Resolution.Attributes[key].ToString());
}

Code: Select all

Key: 1087, value: 0,0001
Key: 1088, value: 3
Key: 1089, value: 1
Key: 1091, value: 0,1
Key: 1092, value: 3
Key: 1093, value: 0,1
Key: 1094, value: 0
Key: 1095, value: 1
Key: 1098, value: 0
Key: 1106, value: 1
Key: 1107, value: 0
Key: 1108, value: 0
Key: 1109, value: 0
Key: 1120, value: 0
Key: 1122, value: 0
Key: 1130, value: 1
Key: 1150, value: 0
Missing in your list of constants are the meanings/descriptions of 1120, 1122, 1130, and 1150.

Also, in my dictionary output (generated from begin applied to a P&F chart) I don't have the key values 1096, 1097, and 1110 that you show in your list. Do you might know why that is the case?

User avatar
Henry MultiСharts
Posts: 9121
Joined: 25 Aug 2011
Has thanked: 1258 times
Been thanked: 2927 times

Re: BOXSIZE value reference

Postby Henry MultiСharts » 11 Aug 2014

FID_CHART_FOOT_PRINT_CHART_TYPE = 1120,
FID_CHART_FOOT_PRINT_SHOW_PERCENT = 1122,
FID_CHART_CUMULATIVE_DELTA_CHART_TYPE = 1130,
FID_BUILD_DAY_FROM_MINUTES = 1150,

1096, 1097, and 1110 are internal values that are of no use, they have been added to the list by mistake, please disregard them. I have also deleted them from Alex's post above.

User avatar
JoshM
Posts: 2099
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1526 times
Been thanked: 1502 times
Contact:

Re: BOXSIZE value reference

Postby JoshM » 12 Aug 2014

Thanks Henry. :]


Return to “MultiCharts .NET”