SierraChart : put 2 colors in the STRING - futures io
futures io futures trading



SierraChart : put 2 colors in the STRING


Discussion in Sierra Chart

Updated by Mejzil
    1. trending_up 304 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

SierraChart : put 2 colors in the STRING

(login for full post details)
  #1 (permalink)
Saint-Sever + Landes/France
 
 
Posts: 1 since Jun 2019
Thanks: 0 given, 0 received

Hello,
I would like to put 2 colors to a STRING of SierraChart.
I would like to put [10] in red and [16] in green in STRING.
The code works for a color on the STRING.
But I can not put 2 colors in the STRING


 
Code
#include "sierrachart.h"
#include <windows.h>
#include <string>

using std::cout;
using std::endl;
using std::string;
using std::to_string;

SCDLLName("TEST");
SCSFExport scsf_TEST(SCStudyGraphRef sc){
 
SCSubgraphRef  VBID=sc.Subgraph[0];
SCSubgraphRef  VASK=sc.Subgraph[1];

  if(sc.SetDefaults){
	  sc.GraphName="TEST";sc.FreeDLL=1;sc.AutoLoop=1;sc.GraphRegion=0;sc.UpdateAlways=1;
	  VBID.Name="BID";VBID.DrawStyle=DRAWSTYLE_CUSTOM_TEXT;VBID.PrimaryColor=RGB(255,255,255);VBID.LineWidth=10;VBID.DrawZeros=false;
	  VASK.Name="ASK";VASK.DrawStyle=DRAWSTYLE_CUSTOM_TEXT;VASK.SecondaryColor=RGB(255,0,255);VASK.LineWidth=10;VASK.DrawZeros=false;
  }

   if(sc.Index==1){
	   
	   string Stxt{};
	   
	  sc.DeleteACSChartDrawing(sc.ChartNumber,TOOL_DELETE_CHARTDRAWING,1);
	  s_UseTool AAA;
		AAA.Clear();
		AAA.ChartNumber=sc.ChartNumber;
		AAA.Region=sc.GraphRegion;
		AAA.DrawingType=DRAWING_TEXT;
		AAA.LineNumber=1;
		AAA.BeginIndex=sc.Index;
		AAA.BeginValue=sc.Low[sc.Index];
		AAA.EndIndex=sc.Index;
		AAA.EndValue=sc.Low[sc.Index];
		AAA.FontSize=VBID.LineWidth;
		AAA.AddMethod=UTAM_ADD_OR_ADJUST;
		AAA.TextAlignment=DT_CENTER;
		AAA.Color=VBID.PrimaryColor;/*<- Color for [10]:*/
		AAA.Color=VASK.SecondaryColor;/*<- Color for [16]*/
                
                Stxt="[10][16]";
		AAA.Text=Stxt.c_str();

	  sc.UseTool(AAA);

   }
}
 
Code
system ("Color 1A");/*does not work in SierraChart!*/
Can you help me ?

Reply With Quote


futures io Trading Community Platforms and Indicators Sierra Chart > SierraChart : put 2 colors in the STRING


June 21, 2019


Upcoming Webinars and Events
 

Introducing Edge Pools: Prop Pricing Model w/Edge Clear

Jul 9
 

Every journal equals ten meals for the hungry

Now
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts