Support Board
Date/Time: Tue, 26 Nov 2024 08:25:37 +0000
Post From: [shared] persistent variables vs study inputs vs direct sc methods (for 2+ studies)
[2023-12-21 19:55:09] |
ertrader - Posts: 672 |
My experience has been the following: (I have not used sc.GetPersistentFloatFromChartStudy): 1) Within the same study: Persistent variables work without issue. Persistence meaning that the value is held regardless of the chart Index within the study and until you change it programmatically. 2) Within the same chartbook but between charts: sc.GetStudyArraysFromChartUsingID() works but you must use study/price price overlay first to get information from the other chart, then reference the study/price overlay. Ensure that your study comes AFTER the study/price overlay in the Chart Studies Window. Your study has to get information AFTER the study/price overlay so it must be below in the sequence. Study Sequence is vital to get the timing right. Persistent variables work fine but again, only within the study. My bots use this method reliably all the time. I have not had success for some reason referencing the other chart directly without using study/price overlay first. Probably something I am missing or doing wrong but this is working. 3) Within or Between chartbooks, studies and SC instances: read/write text files. This works well under nearly any condition and you have complete control. If you want to improve performance, you can use a ramdisk. Trigger timing can be an issue but you can put logic in place to check for conditions. There may be other ways but this has been my experience. Frederick with https://www.simplesystemtrading.com/ wrote a custom trade copier that moves data within and between charts and instances on the same computer. I'm not sure how he does it but you may want to contact him also. Date Time Of Last Edit: 2023-12-21 21:02:20
|