Support Board
Date/Time: Wed, 15 Jan 2025 05:33:36 +0000
[User Discussion] - How to trade a different security from chart
View Count: 1713
[2017-06-04 19:31:43] |
User972044 - Posts: 154 |
Hi there, I would like to trade a different security for which the current chart has been displayed. I am not able to find any documentation for this. Please advise how I can do this in Sierra Charts. Thank you. |
[2017-06-06 06:58:52] |
Sierra Chart Engineering - Posts: 104368 |
You need to use this setting in Chart Settings: Chart Settings: Trade and Current Quote Symbol (text box) (Chart >> Chart Settings >> Symbol >> Symbol menu) 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-06-06 07:22:53] |
User972044 - Posts: 154 |
Ok I will rephrase my question. I would like to trade a different security for which the current chart has been displayed in ASCIL codes. How do I do that? Let's say I have a chart for a stock but in my codes, I would like to also trade in a futures contract in addition to the stock that's displayed in the chart, how do I do that? Which functions should I use? I can't find a structure member in the s_SCNewOrder class that allows you to specify a different security to trade in. Thanks |
[2017-06-06 17:40:37] |
Sierra Chart Engineering - Posts: 104368 |
This is explained here: http://www.sierrachart.com/index.php?page=doc/ACSILTrading.html#SubmittingOrdersDifferentSymbolAccount You must also update Sierra Chart to the current version. Follow the instructions here: http://www.sierrachart.com/index.php?page=doc/SoftwareDownload.php#FastUpdate 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-06-06 21:06:55] |
User972044 - Posts: 154 |
Hello there, I just installed the newest version of Sierra Charts but there has been a lot of problems. First of all, the C++ Compiler is not found anymore. It states the path is not found so I had to spend 4 GB of my computer storage space to install the Microsoft Visual C++ studio and now each time I need to compile my codes, I still get a message that says the C++ Compiler is not found. Please see attached screenshot image. Even though it says "generating code..." I am not sure if the most recent codes are recompiled. I am backtesting right now and it only executes the first trade and that's it. It never executes the same code again to generate more trades. How do I roll it back to the previous version before the current installation? I don't want 4 GB of my computer space occupied by some software that I neither use nor need. My codes are very simple; I am not looking to build them into some kind of libraries or projects. Please advise. Thank you Date Time Of Last Edit: 2017-06-06 21:11:52
|
Private File |
[2017-06-07 01:31:13] |
User972044 - Posts: 154 |
And I think I have found the cause for the codes not executing the trades properly. For some reason, sc.Index is NOT being updated. All the Study functions that return the most current value based on sc.Index e.g. are all working properly; they are returning the correct value but the for some reason, sc.Index is remaining at 0.00000 always from the log. And I remember from my previous coding experience, sc.Index is supposed to be an integer and is supposed to start at 0 and gets incremented during the running of the codes and yet it's a floating number for some reason and remains at 0.0000. I have set Autoloop = 0; just so you know. Please investigate. Thanks |
[2017-06-07 02:27:39] |
Sierra Chart Engineering - Posts: 104368 |
The easiest thing to do is to use the Remote Build command on that window and uninstall Microsoft Visual C++. Although even though you are getting the message indicating the compiler is not found, the compiling/building of the DLL is still successful. I am backtesting right now and it only executes the first trade and that's it. It never executes the same code again to generate more trades. Refer to: Automated Trading From an Advanced Custom Study: Debugging/Troubleshooting Automated Trading Systems Post #6 indicates a problem/misunderstanding with your code. This is fully outside the scope of our support and we cannot help with it. 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 Date Time Of Last Edit: 2017-06-07 02:29:26
|
[2017-06-07 02:41:59] |
User972044 - Posts: 154 |
According to your documentation, sc.Index initially starts at 0 and increments up to sc.ArraySize -1 when the study is fully recalculated. Well this is where the problem is. The sc.Index is NOT being incremented, it's staying at 0. I have sc.Autoloop = 0; and I have ALWAYS set it at 0 and sc.Index has always incremented but not this time. Do I have to manually increment sc.Index by 1 in my codes now? I have never had to do that before. Please advise. |
[2017-06-07 04:35:06] |
Sierra Chart Engineering - Posts: 104368 |
I have sc.Autoloop = 0; This is the problem. You need to understand how manual looping works. Refer to:Working with ACSIL Arrays and Understanding Looping: Manual Looping/Iterating 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-06-07 06:50:06] |
User972044 - Posts: 154 |
I have ALWAYS used sc.Autoloop = 0 and I have NEVER had this problem before and I have done automated trading by ASCIL for a year last year. This new program is just a copy-and-paste from my previous ASCIL codes that were working. And I can't set it to sc.Autoloop = 1, once I do that, it crashes the entire software when I load it into Sierra Charts. Your own documentation even said sc.Index initially starts at 0 and increments up to sc.ArraySize -1 when the study is fully recalculated but sc.Index does not get incremented anymore. And also I used to be able to use the string class NOT SCSTRING but string class from C++ to check for sc.Symbol to make sure I am trading the correct symbol from the chart but now with EXACTLY the same codes copied from my previous working programs, sc.Symbol is coming up blank. I am no longer able to check for substring in sc.Symbol anymore. Something must've gotten changed with these newer versions of Sierra Charts. Please investigate. Thanks. I only have ONE day of full usage of Sierra Charts left. Date Time Of Last Edit: 2017-06-07 06:51:13
|
[2017-06-07 07:20:46] |
Sierra Chart Engineering - Posts: 104368 |
Rather than writing this, read the documentation and understand how the functionality works. You do not need to use automatic looping. Once again refer to the documentation that we linked to. The documentation clearly explains how to use manual looping. We are not going to restate the documentation. This website contains documentation for SCString and there is also documentation for the C++ string class extensively available elsewhere. Nothing has changed in regards to anything you have described. It is all as before. Thanks. I only have ONE day of full usage of Sierra Charts left. 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 Date Time Of Last Edit: 2017-06-07 07:21:22
|
[2017-06-07 20:41:15] |
User972044 - Posts: 154 |
Well obviously many things HAVE changed with the new version. I have just tried to run a previously working ASCIL trading program that was created with version 1394 on my charts and I can't even compile it with NOTHING changed. I received a link error. Please see attached image. And plus the compiler also tried to convert several of my variables from "double" to "int". WHY is that please? Also can you tell me how can I see the sc.Symbol to see what it is comprised off? I am not able to see what sc.Symbol contains using any of the SCSTRING class functions and your documentation does NOT list all of the SCSTRING functions. And I am not sure if the string class is still working in Sierra Charts as I am not able to display sc.Symbol information either after passing it as a string class variable. I have read ALL documentations and I have been programming for a year so don't ask me to read all the documentations please. If I can get some valid answers to my questions that would be great. If I can't have these issues resolved then I won't be able to add additional usage credit as I cannot pay for a software that's not working for me anymore especially when the subscription price has gone up. I am sure you understand. Thank you for your time and help. Date Time Of Last Edit: 2017-06-08 02:48:41
|
Private File |
[2017-06-07 23:06:07] |
User972044 - Posts: 154 |
And also, just to give you an update, I just finished backtesting my previous trading program codes (version 1394 NOT the new one since I couldn't even get it compiled) that I backtested and used for a whole year last year successfully and it didn't send ONE single trade in the trade log. It is doing exactly the same thing as my newly developed program; all the study functions work and do return correct value but sc.Index refuses to get incremented; it just stayed at 0 when it had always incremented by itself when autoloop = 0 according to your documentation. So something definitely changed with the new version or is not working properly with regards to manual looping. It would be great if someone knowledgeable about both the old version and the new changes can take a look and confirm/advise. Thank you |
[2017-06-08 06:10:56] |
Sierra Chart Engineering - Posts: 104368 |
The build error you are receiving is very easily resolved and it is because the DLL file is locked. Refer to the documentation here: Advanced Custom Study Interface and Language (ACSIL): Modifying Advanced Custom Study Code but sc.Index refuses to get incremented; it just stayed at 0 when it had always incremented by itself when autoloop = 0 according to your documentation.
This is why and this has never changed. Once again if you want to use manual looping it is documented here:Working with ACSIL Arrays and Understanding Looping: Manual Looping/Iterating A simple code example is provided. It is very simple. It would be easier for you just to make the change rather than posting all of these posts and making a claim that is not true. In regards to a SCString specifically what do you want to do? 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 Date Time Of Last Edit: 2017-06-08 06:11:37
|
[2017-06-08 06:34:25] |
User972044 - Posts: 154 |
Well I NEVER had to do that. I NEVER had to use a for loop to go through all the the whole array just to send orders when sc.Autoloop = 0. sc.Index has always just incremented by 1 all by itself throughout the program. I have always enclosed all the codes in the if (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED) {} section and it would just send all the orders both in backtesting and live. Even your own documentation stated "sc.Index initially starts at 0 and increments up to sc.ArraySize -1 when the study is fully recalculated" in the section for sc.Autoloop = 0. And all of the study function value at each sc.Index value are ALL correct e.g. Stochastic[sc.Index] and Stochastic[sc.Index -1] all returned correct values at each bar but sc.Index just don't get incremented and no trades are sent. I have subscribed to Sierra Charts for a whole year last year and for that whole year, I was trading by automated trading via ASCIL codes. That was my whole purpose of using Sierra Charts which is to do automatic trading. If my codes weren't working, WHY would I continue subscribe to Sierra Charts for a whole year? I am NOT making claims that's not true. This is what is happening to me. All the codes that worked before, with nothing changed, I copied and pasted them into just a new .cpp file, compiled and all of sudden they are not working anymore. As to strings, this is what I want to do. I want to check for a substring in sc.Symbol which is a SCSTRING class variable but I can't find the function that checks for the substring of an SCSTRING, so I have ALWAYS assigned the sc.Symbol to a string class variable and use the "find" function in the string class to check to make sure that I am trading with the correct symbol. Below are my codes: if (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED) { if (sc.Index == 0) { string Chart_Symbol; Chart_Symbol = sc.Symbol; if (Chart_Symbol.find("SVXY") != -1) { Symbol_OK = 1; } else { Symbol_OK = 0; } Trade_PosL = 0; Trade_PosS = 0; } //later on in my codes if (Symbol_OK == 1) { sc.BuyOrder(NewOrderObject); } } Very simple codes. Worked for a year now it's not working anymore. Any help is appreciated. Date Time Of Last Edit: 2017-06-08 06:48:49
|
[2017-06-08 07:59:19] |
Sierra Chart Engineering - Posts: 104368 |
if (sc.Index == 0) { string Chart_Symbol; Chart_Symbol = sc.Symbol; if (Chart_Symbol.find("SVXY") != -1) { Symbol_OK = 1; } We recommend changing it to this: if (sc.UpdateStartIndex == sc.ArraySize - 2) { if (sc.Symbol.CompareNoCase("SVXY", 4) ==0) Symbol_OK = 1; 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-06-08 20:18:27] |
User972044 - Posts: 154 |
Appreciate the help. So for SCSTRING vs. string class: I can't assign SCSTRING class variables to string class and use string class functions on them anymore? Can you tell me where I can find the complete list of functions and properties of the SCSTRING class? Your documentation didn't list all of them or explain how to use them. I also have other additional manipulations that I would need to do with SCSTRING class variables so it would be useful for both of us if I can be provided with a complete list of functions and properties available to the SCSTRING class unless you continue to allow for the conversion of SCSTRING class variables to string class ones for me to use string class functions like what I did before with my codes. Regarding manual looping and sc.Index: Ok do I still have to increment the sc.Index by 1 manually throughout the whole program? That's what I would like to confirm. Like I said before, all the study function values by each sc.Index are so far all correct even though sc.Index always stays at 0. And I NEVER had to increment sc.Index manually throughout the program when setting sc.Autoloop = 0 before. But this might have changed. So if you can advise that would be great. Also, can you show me what else has changed in these new versions from version 1394 which was the last version that I used to develop my codes? And if possible, is there anyway for me to revert the software version back to 1394 to use my previous codes? Once again, thanks for you help. Date Time Of Last Edit: 2017-06-09 06:17:49
|
[2017-06-09 18:22:58] |
Sierra Chart Engineering - Posts: 104368 |
I can't assign SCSTRING class variables to string class and use string class functions on them anymore?
Yes you can. Refer to: ACSIL Programming Concepts: Directly Accessing a SCString Ok do I still have to increment the sc.Index by 1 manually throughout the whole program? Manual looping does not use sc.Index. Once again refer to the documentation here:Working with ACSIL Arrays and Understanding Looping: Manual Looping/Iterating Also, can you show me what else has changed in these new versions from version 1394 which was the last version that I used to develop my codes? There have been no changes.
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 Date Time Of Last Edit: 2017-06-09 18:24:28
|
[2017-06-10 02:05:43] |
User972044 - Posts: 154 |
Yes you can. Refer to:
ACSIL Programming Concepts: Directly Accessing a SCString Are those ALL of the functions available for the SCSTRING class? The only method mentioned in the documentation to assign SCSTRING class variable to string variable is via the getchar method. Is that the only method available? Manual looping does not use sc.Index. Once again refer to the documentation here:
Can I still use if (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED){} with the for loop? It's not mentioned in the documentation nor can I find it in any of the sample codes that you provided. There have been no changes.
Still quite puzzled why all my programs that worked for a whole year last year all of sudden don't work anymore in the new version. My last question: Is there anyway that I can revert my Sierra Charts to the old 1394 version or 1447 version? Thanks for your help. Date Time Of Last Edit: 2017-06-10 02:05:58
|
[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. |
[2017-06-12 00:17:39] |
Sierra Chart Engineering - Posts: 104368 |
We do not provide programming help, and we are declining further support until you have a paid account. Your expectation of support is exceptionally unreasonable at this point with the amount of free support already provided, especially being you are disregarding what we are saying, and you are not even reading documentation which is completely clear. And on top of this it is also a weekend. But that is really beside the point. Our cost of support is 150USD an hour. You are also making multiple statements, which are in complete conflict with obvious facts. For example, there is no TestString.cpp file provided with Sierra Chart. And the documentation for Manual Looping does not say to use sc.Index. This now is marked as Programming Help and we are leaving this thread. And please post our comments in 100,000 places on the Internet, to expose the "rude" support that we offer. 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 Date Time Of Last Edit: 2017-06-12 00:34:20
|
[2017-06-12 03:18:16] |
User972044 - Posts: 154 |
And please post our comments in 100,000 places on the Internet, to expose the "rude" support that we offer.
Well I have NEVER posted any of our discussion on the Internet. Even though I have read comments in forums criticizing how Sierra Charts' technical support can be rude and curt I have never thought so (well not until this current post). I do notice however a difference in the quality of answers given usually with the less knowledgeable of your personnel giving the less polite answers and the more knowledgeable that support personnel is, the politer his/her answer is but that is expected. 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? Can I still use if (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED){} with the for loop? It's not mentioned in the documentation nor can I find it in any of the sample codes that you provided.
Still quite puzzled why all my programs that worked for a whole year last year all of sudden don't work anymore in the new version. My last question: Is there anyway that I can revert my Sierra Charts to the old 1394 version or 1447 version?
Thanks for your help. Anybody who visits this thread would agree with me that these are legitimate questions that any users would have and as you can notice I have thanked you in advance for helping me. And if you read my post closely, I am NOT mentioning anything about sc.Index although I have used sc.Index successfully with manual looping all last year. But I am trying to ask you about (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED) {} block which is not mentioned at all in the documentation for Manual Looping. And also I am trying to find out where to place this for loop, in the beginning of the codes or within the (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED) {} block because again, it is not stated anywhere in the documentation either nor did you provide any sample codes and since I don't have any additional usage credit anymore, I can't create small test codes anymore to learn how manual looping with the new version works. And also you did not include any explanation as to how sc.Index, sc.CurrentIndex and sc.UpdateStartIndex differ. Your documentation states they all start with the same value and then they become different. How do they become different? Can you use a diagram perhaps to illustrate how they become different in the various stages when study functions are called, when the charts are updated with new data? I am not trying to be difficult but I am really trying to get things resolved so I can continue to subscribe to Sierra Charts as I have stated earlier: If I can't have these issues resolved then I won't be able to add additional usage credit as I cannot pay for a software that's not working for me anymore especially when the subscription price has gone up. I am sure you understand. Thank you for your time and help.
Like I said, I am trying to get these issues resolved as quickly as I can so I can start subscribing to Sierra Charts again but asking me to pay money for a whole month when knowing I won't be able to use the software is a bit unfair. If you don't know the answers to these questions, can you please ask your more knowledgeable colleague(s) to answer them please? Nothing personal, this is just business. I don't mind waiting. It's just that the more I wait, the more delay you will be in getting my money. Date Time Of Last Edit: 2017-06-12 04:09:55
|
To post a message in this thread, you need to log in with your Sierra Chart account: