Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 09:29:14 +0000



Post From: How to trade a different security from chart

[2017-06-11 20:25:10]
User972044 - Posts: 154
Hello there,

Can I get an update on this ticket? It's been two days since I posted my questions in Post #19. In addition, I found something interesting. I actually found a TestString.cpp file that was created on April 21, 2017 that you included with the installation of the new Sierra Charts version that does EXACTLY the same manipulation that I was trying to do with the chart symbol. Please see attached file.

My codes which I repeat here is:

string Chart_Symbol;

Chart_Symbol = sc.Symbol;

if (Chart_Symbol.find("SVXY") != -1)

{

Symbol_OK = 1;

If you compare my codes to the codes in that TestString.cpp file that you created, the codes are exactly identical except for the variable names. So if your codes work, WHY didn't my codes work when they are exactly the same? And it also shows that you ARE able to assign SCSTRING class variables directly to string class without using the GetChars() function in the SCSTRING class. So why is it recommended that I use SCSTRING instead when string class methods are lot more intuitive and easier to use especially when yourself has included a .cpp file illustrating how to use the string class?

Also I have been reading the documentation on Manual Looping, do I ALWAYS have to use a for loop to manually filling the Subgraphy[][] and the sc.BaseData[][] elements every single time when a new bar with new market data is added to the chart? If so, then this manual looping is highly inefficient and how is it different from sc.autoloop = 1 which seems to be doing exactly the same thing? And where do I put this for loop in the codes? In the beginning or during the if (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED) {} block?
Date Time Of Last Edit: 2017-06-11 22:26:30
Attachment Deleted.