Support Board
Date/Time: Sat, 23 Nov 2024 02:29:13 +0000
Post From: Code optimization
[2021-09-11 22:58:38] |
ertrader - Posts: 672 |
The attached code works as expected, compiles with the latest SC and works without issue. It is designed to take a trade signal from another study and initiate a short (-1) or long (1), then disable until re-enabled with a button push. There are some conditions (1-4) that work fine. It uses custom study buttons for enable/disable, short/long enable/disable etc. It all works ok. The only issue I have is performance. Something about the code is inefficient. I believe it has to do with the custom study button code (rows 249-355) This code should have refresh times less than 5 ms IMO as it is not very complicated and relatively short. In studies, the MS refresh time is anywhere from 40-200 MS and more if I add more data. If anyone has recommendations on more efficient code, please let me know! Date Time Of Last Edit: 2021-09-11 23:08:06
|
Screenshot from 2021-09-11 18-57-49.png / V - Attached On 2021-09-11 22:58:09 UTC - Size: 102.28 KB - 241 views Screenshot from 2021-09-11 18-57-24.png / V - Attached On 2021-09-11 22:58:17 UTC - Size: 1.15 KB - 236 views AutoTrade.cpp - Attached On 2021-09-11 23:06:17 UTC - Size: 18.98 KB - 342 views |