Support Board
Date/Time: Sat, 11 Jan 2025 04:40:04 +0000
Retracement Levels.
View Count: 1199
[2016-10-20 14:01:19] |
User429169 - Posts: 14 |
Hello, How to display vales on both sides of the bars. Left side as well right side. Answers Appreciated |
[2016-10-20 17:55:40] |
Sierra Chart Engineering - Posts: 104368 |
You need to enable this option: http://www.sierrachart.com/index.php?page=doc/ChartSettings.html#UseLeftSideScale Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2016-10-21 01:20:44] |
User429169 - Posts: 14 |
Using sierra API, This code displays on one side. How to display Values or Text on both sides of bars. Tool.Clear(); // reset tool structure for our next use Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_RETRACEMENT; Tool.ExtendLeft = 1; // .ExtendLeft = 1;// Extend the horizontal retracement lines to the left of the chart region. Tool.ExtendRight = 1; int &LineNumber4 = sc.GetPersistentInt(4); if (LineNumber4 != 0) Tool.LineNumber = LineNumber4; // Update BarIndex to 40 bars from the end BarIndex = sc.ArraySize - 40; 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(255, 0, 255); // Magenta Tool.AddMethod = UTAM_ADD_OR_ADJUST; for (int i = 0; i < 16; i++) Tool.RetracementLevels = i * 10.0f; Tool.ShowPrice = 1; Tool.ShowPercent = 1; Tool.RoundToTickSize = 0; Tool.TextAlignment = DT_VCENTER; // label vertical alignment sc.UseTool(Tool); LineNumber4 = Tool.LineNumber;//Remember line number which has been automatically set Thank You. |
[2016-10-21 20:14:26] |
Sierra Chart Engineering - Posts: 104368 |
This is not supported unless you were to add 2 Retracement drawings. One which will display the labels on the left side and another one on the right side.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2016-10-22 04:06:27] |
User429169 - Posts: 14 |
Thank you for replay, I tried with 2 Retracement levels code. but displaying only One. SCSFExport scsf_CustomRetracement(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.GraphName = "Retracement"; sc.StudyDescription = ""; sc.FreeDLL = 1; sc.GraphRegion = 0; sc.FreeDLL = 0; sc.AutoLoop = 0; return; } int &TextDrawingLineNumber = sc.GetPersistentInt(1); if (TextDrawingLineNumber != 0 && sc.LastCallToFunction) { // Be sure to remove the Text drawing added as a user drawn drawing sc.DeleteUserDrawnACSDrawing(sc.ChartNumber, TextDrawingLineNumber); return;//No further processing needed in this case. } int BarIndex; s_UseTool Tool; ////// First Retracement Tool.Clear(); // reset tool structure for our next use Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_RETRACEMENT; Tool.ExtendLeft = 0; // .ExtendLeft = 1;// Extend the horizontal retracement lines to the left of the chart region. int &LineNumber4 = sc.GetPersistentInt(4); if (LineNumber4 != 0) Tool.LineNumber = LineNumber4; // Update BarIndex to 40 bars from the end BarIndex = sc.ArraySize - 40; 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(255, 0, 255); // Magenta Tool.AddMethod = UTAM_ADD_OR_ADJUST; for (int i = 0; i < 16; i++) Tool.RetracementLevels = i * 10.0f; Tool.ShowPrice = 1; Tool.ShowPercent = 1; Tool.RoundToTickSize = 0; Tool.TextAlignment = DT_LEFT; // label vertical alignment sc.UseTool(Tool); LineNumber4 = Tool.LineNumber;//Remember line number which has been automatically set ////// Second Retracement Tool.Clear(); // reset tool structure for our next use Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_RETRACEMENT; Tool.ExtendRight = 0; int &LineNumber25 = sc.GetPersistentInt(4); if (LineNumber25 != 0) Tool.LineNumber = LineNumber25; // Update BarIndex to 40 bars from the end BarIndex = sc.ArraySize - 40; 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(255, 0, 255); // Magenta Tool.AddMethod = UTAM_ADD_OR_ADJUST; for (int i = 0; i < 8; i++) Tool.RetracementLevels = i * 10.0f; Tool.ShowPrice = 1; Tool.ShowPercent = 1; Tool.RoundToTickSize = 0; Tool.TextAlignment = DT_RIGHT; // label vertical alignment sc.UseTool(Tool); LineNumber25 = Tool.LineNumber;//Remember line number which has been automatically set } Any thing missing from the code. Thank You Date Time Of Last Edit: 2016-10-22 04:08:54
|
[2016-10-22 05:08:47] |
Sierra Chart Engineering - Posts: 104368 |
The code at the top calling sc.DeleteUserDrawnACSDrawing needs to be removed. There is no user drawn drawing. The key used in this code must be a number other than 4 because it is the same as the previous drawing: int &LineNumber25 = sc.GetPersistentInt(4);
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2016-10-22 07:50:09] |
User429169 - Posts: 14 |
Thank you, with this change it worked. int &LineNumber25 = sc.GetPersistentInt(25); But this code "sc.DeleteUserDrawnACSDrawing" as no effect either removed or not. How to remove that, one slant or slope line? Can i have multiple more than 2 or around 5 retracement on terminal in different locations, Like top, bottom, right, left. Thank You. Date Time Of Last Edit: 2016-10-22 08:07:54
|
[2016-10-24 12:49:24] |
User429169 - Posts: 14 |
Hello, How to remove this slope or slant (attch). Thank you. |
Retracement.jpg / V - Attached On 2016-10-24 12:48:57 UTC - Size: 23.98 KB - 238 views Attachment Deleted. |
[2016-10-25 10:58:49] |
Sierra Chart Engineering - Posts: 104368 |
Can i have multiple more than 2 or around 5 retracement on terminal in different locations, Like top, bottom, right, left. We do not see a variable to remove the main line of the Retracement drawing. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2016-10-25 12:30:27] |
User429169 - Posts: 14 |
I took 4 retracement levels as above code, all are displaying on same location ie lower right corner. Any code need to add or modify from the above code so that all 4 will display in different potions or locations. Thank You. |
[2016-10-25 17:08:17] |
Sierra Chart Engineering - Posts: 104368 |
We do not understand the purpose of the question because it should be extremely obvious how to do this. You need to change these particular structure members: Tool.BeginDateTime
Tool.EndDateTime Tool.BeginValue Tool.EndValue Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2016-10-26 10:58:22] |
User429169 - Posts: 14 |
Yes, able to display all the retracement levels at different loactions. Actually this for some study purpose. Why the screen is moving up after levels added. How to display this levels without screen moving above. Thank you Date Time Of Last Edit: 2016-10-26 10:59:04
|
Screen-move.jpg / V - Attached On 2016-10-26 10:57:15 UTC - Size: 84.02 KB - 289 views |
[2016-10-26 17:15:03] |
Sierra Chart Engineering - Posts: 104368 |
It looks as though there is a study which is being displayed in Chart Region 2 which is not displaying anything. Refer to: http://www.sierrachart.com/index.php?page=doc/ChartStudies.html#ChartRegion Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2016-10-27 06:52:01] |
User429169 - Posts: 14 |
sc.GraphRegion = 0; This is missing, now it's working. Thank you |
To post a message in this thread, you need to log in with your Sierra Chart account: