NexusFi: Find Your Edge


Home Menu

 





Questions and discussion for Sierra Chart ACSIL for Beginners


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one Trembling Hand with 43 posts (34 thanks)
    2. looks_two mosalem2003 with 39 posts (0 thanks)
    3. looks_3 1m1k3 with 20 posts (0 thanks)
    4. looks_4 bradhouser with 6 posts (9 thanks)
      Best Posters
    1. looks_one bobwest with 3.5 thanks per post
    2. looks_two bradhouser with 1.5 thanks per post
    3. looks_3 TropicalTrader with 1 thanks per post
    4. looks_4 Trembling Hand with 0.8 thanks per post
    1. trending_up 26,770 views
    2. thumb_up 52 thanks given
    3. group 30 followers
    1. forum 118 posts
    2. attach_file 25 attachments




 
Search this Thread

Questions and discussion for Sierra Chart ACSIL for Beginners

  #31 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 358


mosalem2003 View Post
I think there might be an issue with the Get function to import the arrays .. this is not what I expected from ACSIl... This is too basic and we need to work it around !!!

I would look at your code and when it is executing and with what values before thinking there is an error in ACSIL. I think that assumption is incorrect.... from experience.

Follow me on Twitter Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #32 (permalink)
mosalem2003
Toronto
 
Posts: 102 since Apr 2019
Thanks Given: 106
Thanks Received: 23

I noted the code logic works perfectly once In copy and paste the Dochian channel study code into the system.... So the main difference between working and non working version is the import of the study into subgraph .

Sent using the NexusFi mobile app

Reply With Quote
  #33 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 358



mosalem2003 View Post
I noted the code logic works perfectly once In copy and paste the Dochian channel study code into the system.... So the main difference between working and non working version is the import of the study into subgraph .[/URL]

Is this in live/replay or in the first load of the chart?

because you have this in the code,

 
Code
if (sc.IsFullRecalculation)
		return;

Follow me on Twitter Started this thread Reply With Quote
  #34 (permalink)
mosalem2003
Toronto
 
Posts: 102 since Apr 2019
Thanks Given: 106
Thanks Received: 23

I do it in replay --- I added a spreadsheet to figure out that the arrays are empty.
I searched sc.GetStudyArrayUsingID empty and there are many similar issues that the support doesn't answer clearly...
for example:

https://www.sierrachart.com/SupportBoard.php?ThreadID=10175
and support mainly points to precedence and my precedence is set to very low and the studies to import are at the start of the calc order.
https://www.sierrachart.com/index.php?page=doc/doc_ChartStudies.html

Reply With Quote
  #35 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 358


mosalem2003 View Post
I do it in replay --- I added a spreadsheet to figure out that the arrays are empty.
I searched sc.GetStudyArrayUsingID empty and there are many similar issues that the support doesn't answer clearly...
for example:

https://www.sierrachart.com/SupportBoard.php?ThreadID=10175
and support mainly points to precedence and my precedence is set to very low and the studies to import are at the start of the calc order.
https://www.sierrachart.com/index.php?page=doc/doc_ChartStudies.html

Ok this is probably my last post here for some time BUT,

Thats not true to what I have found with that function. I've showed you with the code I pasted on post #22 that its populating the correct values into the array from a linked study. I'm pretty sure you have an error somewhere. Maybe even the setting to the study like the screen shot?




2020-12-23 18_25_41-Window

Follow me on Twitter Started this thread Reply With Quote
  #36 (permalink)
mosalem2003
Toronto
 
Posts: 102 since Apr 2019
Thanks Given: 106
Thanks Received: 23

Yes, there was calculation using the subgraph as in #22 but the performance of the study was not correct compared to another actual study that I coded in Spreadsheet..
Then, I did plot the variables L2_Buyer, L2_Seller to find that they are not correct as per the charts I sent earlier... I returned back and copy/paste the Donchian code within the code and it works as the spreadsheet....
So, I am revisiting the import into an array or even a subgraph but trying to do it such that the array is correct ... Subarray is empty --graph is not but incorrect...
No I have demand Index in the settings as ID2.SG1




Reply With Quote
  #37 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 358

DC High/Low are referencing Study 1 and Demand Index Study 2? Is that right?



Follow me on Twitter Started this thread Reply With Quote
  #38 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 358

If the above didn't fix it....

Actually thinking about this you REALLY need to have this all in a separate study then just import the signal into your trading system.

 
Code
 // One Time Processing per Bar  
    int& LastBarIndexProcessed = sc.GetPersistentInt(0); 
    if (Index == 0) 
      LastBarIndexProcessed = -1; 
    if (Index == LastBarIndexProcessed) 
      return; 
    LastBarIndexProcessed = Index;
This is almost certainly where your problem is. Get the study logic working in a separate function as you shouldn't have study logic in you trading system, makes it WAY too hard to debug as your result has shown. Pretty sure its not filling correctly because of its either pointing to an incorrect subgraph or a line of code somewhere in the spaghetti you posted at #16 is stopping a full run. (hopefully you are using Auto-Looping? because if no thats the problem)

Follow me on Twitter Started this thread Reply With Quote
Thanked by:
  #39 (permalink)
mosalem2003
Toronto
 
Posts: 102 since Apr 2019
Thanks Given: 106
Thanks Received: 23

I tried many iterations and the only one that works is copy paste the Dochian channel study code as part of the system before the trading logic ..
What is interesting is that the import of the demand index study is working but the Dochian channel subgraphs cannot be ported properly.

There is nothing wrong with the trading logic as it works just by forcing the code of the Dochian channel locally but the Get of its arrays is not working. I mean by it working that the array elements are not correct all the time....

I think the Get issue is a common topic among the support board and there was no clear response from Sierra support as usual.

Thanks a lot and have a happy holidays ....

Sent using the NexusFi mobile app

Reply With Quote
  #40 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,343
Thanks Received: 26,267



Trembling Hand View Post
If the above didn't fix it....

Actually thinking about this you REALLY need to have this all in a separate study then just import the signal into your trading system.

...
This is almost certainly where your problem is. Get the study logic working in a separate function as you shouldn't have study logic in you trading system, makes it WAY too hard to debug as your result has shown. Pretty sure its not filling correctly because of its either pointing to an incorrect subgraph or a line of code somewhere in the spaghetti you posted at #16 is stopping a full run. (hopefully you are using Auto-Looping? because if no thats the problem)


mosalem2003 View Post
I tried many iterations and the only one that works is copy paste the Dochian channel study code as part of the system before the trading logic ..
What is interesting is that the import of the demand index study is working but the Dochian channel subgraphs cannot be ported properly.

There is nothing wrong with the trading logic as it works just by forcing the code of the Dochian channel locally but the Get of its arrays is not working. I mean by it working that the array elements are not correct all the time....

I think the Get issue is a common topic among the support board and there was no clear response from Sierra support as usual.

Thanks a lot and have a happy holidays ....

Sent using the NexusFi mobile app

I have not followed this in detail and have just a couple of simple thoughts.

1. Since this thead is about best practices, it is always a better practice to keep code compartmentalized in separate functions or classes, rather than putting it all together in one large one. This prevents unintended interactions within parts of the larger chunk of code, and everything I read (albeit I read it quickly) suggests that this was probably your problem. Even if it isn't in this instance, it will be, again and again, until you keep the parts of your code better separated.

I am not saying this as a critic. I am saying it as someone who had to learn the lesson again and again as I tried to track down my own mistakes. I understand the appeal of copy and pasting. It's also one of the most common ways to create unnecessary problems. I learned this too.

2. I remember reading a couple of times in this thread that you thought there was some error with the ACSIL framework itself, including in the quote above: "I think the Get issue is a common topic among the support board and there was no clear response from Sierra support as usual. "

When I was first starting out, a long time ago, I remember concluding that there was an error in the compiler of the language I was using. It turned out it was in my code. I will say, "of course." I come to that conclusions a few times after that, but since it never actually worked out that my code was rignt and the compiler was wrong, I got over this one too.

Again, I'm not being a critic. If I hadn't done this I would not have said anything.... and I am sure that everyone makes this mistake early on. But it's always been a mistake, at least when I did it.

With all this said, if you have gotten the code to work the way you wanted, congratulations. Working code is always better than neater, but non-working, code. But it you take @Trembling Hand's suggestions seriously, you will find writing and debugging to be a lot easier and faster.

Just some thoughts. I'm glad it is working now.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
Thanked by:




Last Updated on February 5, 2024


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts