Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 15:40:23 +0000



Post From: Help with Study - but attached working Keltner Channels with Hull MID

[2020-06-18 19:38:13]
User463534 - Posts: 3
Hi!
I know it is posted that custom programming questions will not be answered by staff and I’m hoping that users on here would be willing to lend a hand to a new SC member. In researching my compilation errors and questions I see coding questions are answered here by users so I know this is the right place to ask. Attached also is a working copy of double Keltner channel with Hull MA Mid - its just not how I want it and I'm trying to code it also to better stadards.

I recently moved over to SC in an effort to automate a strategy with I run manually but on an alert trigger basis. I'm stuck trying to build a really simple visual indicator, a hull MA with 2 sets of ATR bands whose values are necessary for my risk and trailing components of the system. I figured coding this simple indicator would be a logical first step in my endeavors, but i seem to be thoroughly stuck at what I would assume be a simple header or syntax type error in my code.

What is coded are double ATR bands (length, average type selectable, multiplier selectable) wrapped +- around a hull moving average (price type, length selectable). This was standard in my other platform by using 2 Keltner channels and its a visual match to part of the strategy. I easily coded the double version and bactestable strategy in my other plaform but I'm not having much luck here.

I found many coding examples in the ACS folder that closely match, read most of the ASCIL guides and extensively attempted this myself – there is a lot of information and many examples which is why it is driving me nuts that I can’t get this to work as I intend it to.
I successfully, created the indicator using a user example here that just uses the unnamed SC arrays for inputs and subgraphs , but I can't get the price type or separate int input value for the ATR length to work ( currently it is set up to be the same as the Hull length which does indeed work). I also could not get a user selectable price type functionality to work either (select, open, close, OHCL4, etc) - it is currently set to last which is OK. So it works based on an example of ATR Bands and the hull mid was added but i need to get a couple of features to work better.

I also took it upon myself per the ACSIL Interface Members - sc.Input Array: Using References to Inputs best practices to add proper naming conventions to the array variables, but it just fails to compile with errors such as
'SC' was not declared in this scope
SCInputRef HULL_LENGTH = SC.INPUT[0];

It seems these would be very easy to fix. The code is there, and what isn't working on the SC array version is commented out. And the other attached version V4 was my attempt at taking the working unnamed version of the code , and simply just renaming the variable properly but that doesn't compile. Any help looking this over would be greatly appreciated. I get and understand all of the Studies*.cpp examples. I don't get how this matches the examples but doesn't' compile or why my original version won't compile if I add a couple of additional inputs. I'm stumped and appreciate any help! the platform and look forward to trading in it.

Thanks!
NOTE: V2_2 is the working unnamed variable version that needs the inputs for price type and ATR length added. V4 is my attempt at taking the working vs 2_2 and naming the variables properly
attachmentDTEK_V2_2_HULL_DOUBLE_KELTNER_BANDS.cpp - Attached On 2020-06-18 19:32:19 UTC - Size: 5.68 KB - 232 views
attachmentDTEK_V3_HULL_DOUBLE_KELTNER_BANDS.cpp - Attached On 2020-06-18 19:32:28 UTC - Size: 5.94 KB - 228 views