Support Board
Date/Time: Mon, 17 Mar 2025 18:22:48 +0000
[Programming Help] - Refresh Chart To Update Studies/Automated strategy
View Count: 1104
[2022-09-14 19:00:01] |
User769783 - Posts: 191 |
I have developed a study/trading automation written is ASCIL. I have to refresh the chart a lot to get an updated signal from my study. Not sure why but since I am using these functions it is happening: sc.NumberOfAskTrades[sc.Index]; sc.NumberOfBidTrades[sc.Index]; sc.DownTickVolume[sc.Index]; sc.UpTickVolume[sc.Index]; sc.BaseData[SC_ASK_BID_VOL_DIFF_MOST_RECENT_CHANGE][sc.Index]; .... Are there certain requirements when using these functions in custom studies? Thanks |
[2022-09-14 19:09:16] |
User431178 - Posts: 615 |
Did you set sc.MaintainAdditionalChartDataArrays in the setdefaults block? ACSIL Interface Members - Variables and Arrays: sc.MaintainAdditionalChartDataArrays ACSIL Interface Members - Variables and Arrays: sc.BaseDataIn[][] / sc.BaseData[][] |
[2022-09-14 19:23:02] |
User769783 - Posts: 191 |
Yes. I set it to 1 and then I tried true. When I use othe functions the study performs and trades as it should, it trades every signal. When I use either of the aforementioned functions, it does not always get the updated signal until I refresh the chart. Killing the efficiency of my custom study.
|
[2022-09-15 13:23:26] |
User769783 - Posts: 191 |
Getting super pissed off because I have to press Insert to refresh my chart to get my automated study to update, this is really ticking me off. ANY HELP PLEASE!!!
|
[2022-09-15 13:58:34] |
JohnR - User831573 - Posts: 320 |
"Comment from a self taught ACSIL guy" My guess it is not this, but does your strategy / study have sc.AutoLoop = 1; If not it is manually looping and waiting for 'something' to tell it to execute. But, I'm guess you already have this. JohnR |
[2022-09-15 14:27:45] |
User431178 - Posts: 615 |
Maybe if you showed some of the code someone could help diagnose? What you are asking now is equivalent to saying my car doesn't start, fix it for me, but you can't actually look at it to diagnose the root cause. sc.NumberOfAskTrades[sc.Index]; sc.NumberOfBidTrades[sc.Index]; sc.DownTickVolume[sc.Index]; sc.UpTickVolume[sc.Index]; sc.BaseData[SC_ASK_BID_VOL_DIFF_MOST_RECENT_CHANGE][sc.Index]; Also, other than the item I mentioned before, there is no specific requirement for using thse functions, so can only conclude that there is a logic error somewhere in your study. Date Time Of Last Edit: 2022-09-15 14:28:49
|
[2022-09-15 14:40:19] |
User769783 - Posts: 191 |
@JohnR, yes I do have it set to 1, still....
|
[2022-09-15 15:06:48] |
User769783 - Posts: 191 |
The code logic is fine, it is some setting maybe in SC itself. I was hoping someone has experienced this before. Only happened after I installed SC on new laptop and transferred my studies to it.
|
[2022-09-15 15:07:52] |
User769783 - Posts: 191 |
MAN, can I please pay someone to help me with this issue, this is really killing my trading performance. Thanks
|
[2022-09-15 15:29:03] |
User431178 - Posts: 615 |
If you don't to share the code publicly, send me a direct message and I will look at it for you.
|
[2022-09-15 16:18:26] |
JohnR - User831573 - Posts: 320 |
One other step you could take is to use VisualStudio and step through the debugger, Maybe after hours - replaying the chart to see how it updates and how often your code is getting called. Also, try installing a version of SC a few back, before you noticed the issue and see if it runs. JohnR |
To post a message in this thread, you need to log in with your Sierra Chart account: