Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 20:02:59 +0000



ACSIL code for Open/High/Low/Last

View Count: 3088

[2017-06-12 19:09:02]
User138418 - Posts: 16
I’m a newbie who has hit a dead end in documentation search. In ACSIL, I have been unable to find out to address Open, High and Low; “Last” stopped generating syntax errors when I finally wrote (dummy code):
If (sc.LastTradePrice > sc.Open)…
Is my usage for Last correct? How should I be addressing Open, High, and/or Low for this bar?
Next, I will also need OHLC for previous bars, but have not yet tried to look that up. Help?
[2017-06-12 19:40:28]
User29926 - Posts: 92
Have you looking at the sample ACSIL code files located in the "ACS_Source folder"?
It will help you to learn a lot.

Current bar data:
sc.High[sc.Index]
sc.Low[sc.Index]
sc.Open[sc.Index]
sc.Close[sc.Index]

Previous bar data:
sc.High[sc.Index-1]
sc.Low[sc.Index -1]
sc.Open[sc.Index -1]
sc.Close[sc.Index-1]
[2017-06-12 19:49:33]
Sierra Chart Engineering - Posts: 104368
You do not want to use sc.LastTradePrice. That is inconsistent with sc.Open[].

The best thing to do at this point, is refer to this page:
http://www.sierrachart.com/index.php?page=doc/ACS_ArraysAndLooping.html
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-12 20:07:21]
User138418 - Posts: 16
Thanks for the EXTREMELY PROMPT answer THAT WORKS!! YAY!!!
Yes, I have used the “ACS_Source” a lot – but my Search has stopped working, and scrolling by hand through 8 files gets really old and takes more time than it’s worth -- usually. Any ideas how to get “Search” back in working order? I’ve tried most option settings to no avail, and I’m sure all the boxes are completed correctly.
[2017-06-12 20:14:37]
Sierra Chart Engineering - Posts: 104368
Refer to the documentation here:
http://www.sierrachart.com/index.php?page=doc/BuildCustomStudiesDLL.html#SearchingSourceCodeBuiltIn
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-13 06:06:11]
User972044 - Posts: 154
Current bar data:
sc.High[sc.Index]
sc.Low[sc.Index]
sc.Open[sc.Index]
sc.Close[sc.Index]

Previous bar data:
sc.High[sc.Index-1]
sc.Low[sc.Index -1]
sc.Open[sc.Index -1]
sc.Close[sc.Index-1]

Did you use sc.Autoloop = 1 or 0. Apparently this only works if you use sc.autoloop = 1. If you set sc.Autoloop = 0 which is manual looping, it does not work because manual looping does not use sc.Index according to what I have been advised by Sierra Chart Engineering.

If it works, good for you. For me, when I set sc.Autoloop = 1, my program crashes the software and when I set sc.Autoloop = 0, I can't use sc.Index.

Thanks
Date Time Of Last Edit: 2017-06-13 06:23:39
[2017-06-13 17:41:57]
Sierra Chart Engineering - Posts: 104368
The code in post #2 is for automatic looping.
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