I apologize for the lame question... but how one can reference the BOXSIZE value from the script in P&F charts?
Thank you.
BOXSIZE value reference [SOLVED]
- Alex MultiCharts
- Posts: 194
- Joined: 09 Aug 2013
- Has thanked: 43 times
- Been thanked: 77 times
Re: BOXSIZE value reference [SOLVED]
Hello sleonov1,
Please see the script sample below:
[Added to NET FAQ]
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
}
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: BOXSIZE value reference
Could you provide the full list of Keys or tell me where I can find these?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;
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
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?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: BOXSIZE value reference
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.
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.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact: