Support Board
Date/Time: Mon, 07 Jul 2025 06:09:12 +0000
Post From: Synchronous ASCIL method to draw on a chart on demand?
[2014-11-02 16:10:48] |
maxima120 - Posts: 151 |
I know that the cornerstone of user created studies in ASCIL is to place the code into a scsf_Xxxx method which will be called asynchronously from within the SC core code on each tick. Lets say I have a regular chart #1. Now imagine I have a some sort of event happened in another chart #2. I want to be able to call a method synchronously (from within the scsf_SomeChart2Study) on the chart #1 and tell it to draw something on chart #1. I know its not something you might want to consider lightly but sooner or later these sorts of interactions between charts will become inevitable. My advice would be to get on with it rather sooner. So you can implement it in your own time rather to some deadline. My idea of implementation would be: 1. create a dictionary of all charts in chartbook accessible from all custom studies. 2. create synchronous methods on chart objects (which might be just functions to call within common sense, like calling draw tool on that chart regardless the state of the chart (eg in between ticks) or alternatively 2. trigger a 'tick' artificially by calling something on chart #2 from chart #1 eg SCSFExport scsf_StudyOnChart1(SCStudyInterfaceRef sc) { ... chart2.OnTick(); ... } |