Support Board
Date/Time: Tue, 26 Nov 2024 08:58:46 +0000
Post From: [shared] persistent variables vs study inputs vs direct sc methods (for 2+ studies)
[2023-12-20 22:34:51] |
User133994 - Posts: 80 |
PART 2: My 2nd example is on the same 2 studies, 2 charts, 2 accounts. This time I'm sharing a persistent int between the 2 studies; but, the exact same info is also stored in an output of the top chart. And I watch it in realtime and the output switches values, but the 2nd bottom chart doesn't see the updated shared persistent int until a bar later (not as long as the above example), but still underperforming expectations!? So, now you understand why I prefer using sc.GetStudyArraysFromChartUsingID() >> appears to work much quicker than persistent shared variables. Again, I'm providing this as more context for the above questions (I'm not using account info this time, just a basic int from the logic space of chart 1). Yet, there is still a delay. No, I'm not using 'fast persistent' because I don't have hundreds of persistent variables being shared...I have about 20 shared persistent variables between the 2 charts. Has anyone else has the same problem? Would someone please share your ideas on why persistent shared variables work sometimes as expected; and, other times appear to be underperformant? Also, would someone recommend the proper context for each method (a) shared persistent variables vs (b) shared study arrays vs (c) direct sc methods--or should they all work equally well when sharing states of variables (i.e. float/int, etc.) between 2 different studies on 2 different charts using 2 different trading accounts? Thanks again |