Login Page - Create Account

Support Board


Date/Time: Tue, 07 May 2024 14:26:26 +0000



DRAWING_TEXT not refreshed

View Count: 692

[2017-03-30 16:00:33]
User53601 - Posts: 105
Hello,

I use the s_UseTool to draw DRAWING_TEXT on the chart.

In case I do refresh of the chart, by Analysis/Studies/OK,
the text drawing is not refreshed/displayed.

Could you please give an advise where the issue could be?
[2017-03-30 16:57:35]
Sierra Chart Engineering - Posts: 104368
We need to see the code which uses sc.UseTool.
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
[2017-03-30 17:51:45]
User53601 - Posts: 105
void TextDrawing (SCStudyInterfaceRef sc, float Div1, float BeginValue, int LineNumber, int Offset, int VerOffset)
       { // UseTool1
      
         SCString Text01;
         sc.FormatString(Text01, "%.0f ", Div1 );
        
         s_UseTool Line01;

         Line01.Clear();          
         Line01.LineNumber = LineNumber;
         Line01.DrawingType = DRAWING_TEXT;    
          
// Color and width          
         if ( Div1 > 0 )
         { //               
         Line01.LineWidth = 4 ;                                                            
            Line01.Color = RGB(128,255,0);           
           }
         else { //                 
         Line01.LineWidth = 1 ;                                                            
         Line01.Color = RGB(255,0,255);              
           }
                    
          
         Line01.Text = Text01 ;        
        
         Line01.BeginDateTime = sc.BaseDateTimeIn[sc.Index-Offset];
         Line01.EndDateTime = sc.BaseDateTimeIn[sc.Index-Offset];
                                  
         Line01.BeginValue = BeginValue + VerOffset*sc.TickSize ;
         Line01.EndValue = BeginValue * VerOffset*sc.TickSize;            
          
       Line01.AddMethod = UTAM_ADD_OR_ADJUST;
         Line01.AddAsUserDrawnDrawing = 1;

         sc.UseTool(Line01);          
       };
[2017-03-31 01:10:11]
Sierra Chart Engineering - Posts: 104368
We recommend looking at the /ACS_Source/studies2.cpp/ scsf_CountDownTimer study for a good example of user drawn text drawing.

There is no way we can help with your own code. It is not a simple or usable example for us.
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

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

Login

Login Page - Create Account