Login Page - Create Account

Support Board


Date/Time: Sun, 23 Feb 2025 14:05:53 +0000



[User Discussion] - using OOP clases for studies and trading systems

View Count: 642

[2021-02-14 20:14:44]
User30743 - Posts: 365
Is anybody using the oop approach when building studies and trading system?

I can see that most (if not all the examples) are procedural style code, which is ok for simple things but I find it quite messy for more complex stuff and generally I like having things encapsulated in classes (Java deformation), so I am thinking of refactoring the code into OOP. But I have not tested anything yet and I don't know what kind of caveats it can have.

Any suggestions on this topic?
Date Time Of Last Edit: 2021-02-14 20:15:29
[2021-02-14 21:45:53]
User99735 - Posts: 234
Hi,
I have been using std classes like std::map without any issues. So my advice would be that custom classes can also be used.

Regards

Vivek
[2021-02-15 10:22:28]
User30743 - Posts: 365
yeah, sure, I am using std:: a lot. I mean custom classes - I have for example a Logger class, or class handling DB connections etc. I would also like to wrap the system logic into a class
[2021-02-17 15:19:44]
User99735 - Posts: 234
Other custom classes can be used while taking care of threading issues, ie with DB Connections etc.
[2021-02-17 16:29:03]
User30743 - Posts: 365
does sierra work ok with threaded code?
[2021-02-17 17:01:06]
norvik_ - Posts: 106
Yes it works fine. If you need to to do some heavy things or endless loop, it can be executed in the separate thread.

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

Login

Login Page - Create Account