Login Page - Create Account

Support Board


Date/Time: Wed, 15 May 2024 14:58:53 +0000



Post From: Using Visual Studio C++ to create Custom Studies

[2021-12-14 20:04:48]
WarEagle - Posts: 70
First of all, thank you User972768 for creating this thread. It is nice to see there are other users that need VS capabilities. Back when Sierra supported VS implementation I used it to create some custom work and have felt on my own ever since. I have run into a problem that maybe you or someone else on this thread might know the answer to. It is no doubt a result of my being a trader and not a programmer. All of my programming is self-taught out of necessity and so as you can imagine it is likely lacking in proper structure and protocol.

In brief, I have a list of indicators I wrote that use something called the Swiss Ephemeris. This is a third party library of functions that calculate astronomical positions, so things like a full moon, eclipses, etc. I was never able to access the dll for this library from code made in Notepad+ and compiled using the Sierra remote build. There may be an easy way to do this but I have never been able to get Sierra's compiler to see an external library. So I turned to VS. It took me over a year to figure out how to get it to work there, ultimately requiring me to add a lot of .c and .h files from the Swiss Ephemeris source code which is already included in the dll they provide. Once all of that was added to my project, the dll I created worked in Sierra. Since then, whenever I needed to add something I just shut down Sierra, build (in debug, the only way it worked) the updated dll and reopen Sierra.

The problem comes in trying to get it to work on another computer. I have a trading friend that I want to share the indicators with. He dropped the dll I made into his Data folder just as it is in mine. He placed the Swiss Ephemeris dll file (along with all its source code) in the ACS_Source folder just as my VS build settings show as the location of dependency files. We have even gone as far as to make a direct copy of my ACS_Source folder to replace his to make sure all the files are the same. No matter what we try he can not see the indicators. In the start up log it shows the dll load, seemingly without error. Other custom dlls that do not rely on the external library load that were remote built in Sierra and they work fine. When a new chart is opened, the log shows all the custom dlls load except for the one I built with VS.

I do not know if this is because I have some file in the wrong place or if something is happening on the computer where I build the indicator in VS that allows Sierra to see all the files it needs whereas on a different computer it is missing something. We have tried to replicate everything on my end with everything on his end and nothing seems to work. I worry that if I ever get a new pc I may not be able to get it all working again. Unfortunately the programmers of the Swiss Ephemeris are as equally unhelpful as Sierra since this problem is so unique that neither side has any interest in it and it clearly seems to be from user error.

Does this make sense to any of you experienced Visual Studio users? I really appreciate any tips you might have.