Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 18:41:42 +0000



[Programming Help] - Custom Study - CanddleStick Patterns Finder

View Count: 656

[2018-12-22 14:26:01]
Mig - Posts: 3
Hi,

I am trying to detect a new custom candle. To do so :

1. I added SCDLLName("Custom Study DLL") at the top of the CustomStudies.cpp
2. I added a new function called bool IsLongLeggedDoji(SCStudyInterfaceRef sc, const s_CandleStickPatternsFinderSettings& settings, int index);
3. I added 1 to extern const char * CandleStickPatternNames[66][2]; -> extern const char * CandleStickPatternNames[67][2];
4. const char * CandleStickPatternNames[66][2] -> const char * CandleStickPatternNames[67][2]
with a new field {"IsLongLeggedDoji","LLDC"}
5. I added this to the pattern detection :

case 66:
     PatternDetected = IsLongLeggedDoji(sc, PatternsFinderSettings, sc.CurrentIndex);
     break;


After doing all this, it seems I still cannot get the interface to load up my custom pattern.

I believe this function is the problem :

SCSFExport scsf_CandleStickPatternsFinder(SCStudyInterfaceRef sc)
{
   SCSubgraphRef Pattern1 = sc.Subgraph[0];

How can I get this sc.Subgraph[0] to load my custom list of patterns instead of the default ? Changing the files CandleStickPatternNames.h and CandleStickPatternNames.cpp didn't help me at all.

I'm starting to believe I should just change the code of one of the pattern I don't use but I think it's less "clean" despite being easier I guess.

Thanks for the help
[2018-12-30 21:02:01]
Mig - Posts: 3
Hi,

I hijacked one of the candlestick pattern and incorporated my code but I am planning to do a few of these custom studies.

It would be more appropriate if I could simply add my custom names and code instead of hacking these pattern.

Does anyone know how I could add my own candlestick pattern names ?

Thanks

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account