Login Page - Create Account

Support Board


Date/Time: Sat, 11 Jan 2025 07:05:38 +0000



[Programming Help] - How to display data on retracement lines as per buffer order

View Count: 727

[2016-11-08 11:14:52]
User429169 - Posts: 14
Hello,

Why the data is not display in order as in arr4 and arr5. It is displaying in ascending order or high to loaw.

How to display the data in arr4[] or arr5[] order.

This piece of code for one retracement and another retrace is similar but with different number with arr5

float arr4[50] = { 0.87, 1.09, 1.53, 7.41, 9.80, 11.98, 61.00, 72.98, 88.89, 99.35, 100.00, 100.00, 2.18, 2.83, 3.27, 3.70, 4.88,5.45,6.75};
float arr5[50] = { 100.00, 98.47, 88.45, 76.47, 63.83, 50.98, 40.31, 16.78, 13.73, 9.15, 6.97, 5.88, 5.01, 4.14, 3.92, 2.83, 1.74, 0.65};



Tool.ChartNumber = sc.ChartNumber;
  Tool.DrawingType = DRAWING_RETRACEMENT;
  Tool.ExtendLeft = 0; // .ExtendLeft = 1;
  int &LineNumber1 = sc.GetPersistentInt(1);
  if (LineNumber1 != 0)
  Tool.LineNumber = LineNumber1;   // Update BarIndex to 40 bars from the end
  BarIndex = sc.ArraySize - 16;
  BarIndex = max(BarIndex, 0);
  Tool.BeginDateTime = sc.BaseDateTimeIn[BarIndex];
  Tool.EndDateTime = sc.BaseDateTimeIn[sc.ArraySize - 1];
  Tool.BeginValue = sc.High[sc.ArraySize - 1];
  Tool.EndValue = sc.Low[BarIndex];
  Tool.Color = RGB(0, 0, 255); // Blue
  Tool.AddMethod = UTAM_ADD_OR_ADJUST;
  for (int i = 0; i < 30; i++)
  {
Tool.RetracementLevels[i] = arr4[i];
  }
  Tool.ShowPrice = 1;
  Tool.ShowPercent = 1;
  Tool.RoundToTickSize = 0;
  Tool.TextAlignment = DT_RIGHT; //DT_VCENTER; // label vertical alignment
  sc.UseTool(Tool);
  LineNumber1 = Tool.LineNumber;//Remember line number which has been automatically set


Thank You,
Answers Appreciated[/i][/i][/i]
Date Time Of Last Edit: 2016-11-11 10:56:52
imageretracement-order.jpg / V - Attached On 2016-11-08 11:08:30 UTC - Size: 65.57 KB - 260 views
[2016-11-11 07:28:59]
User436215 - Posts: 1
Hello All,

Any solution to this?

Thank You,
Answers Appreciated

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account