Support Board
Date/Time: Mon, 25 Nov 2024 20:43:00 +0000
Post From: sc.GetStudyArrayFromChartUsingID() won't work from another chart?
[2024-02-11 05:52:38] |
j4ytr4der_ - Posts: 938 |
I stand slightly corrected. To my utter shock and dismay, this function can only fetch a value from another chart if both the timeframe AND number of bars, match! I want to get the win rate of all my trades, across all contracts, and pull it into my main chart. This chart is a 30min chart that loads only 3 days of data to reduce load. I've set up a separate chart (was a daily, but now I see it has to be 30min as well) and set it to 200 days of data, so that I can get ALL the trades (I've enabled showing fills from all contracts). Now I've discovered that if I set this chart to 3 days, I get the value just fine... but of course it's only 3 days of fills! If I set it to anything more than 3 days, it won't return anything because the main chart is 3 days. It's looking like If I want this to work, I have no choice but to do it directly on my main chart and just set that to 200 days to get everything. This is extremely disappointing. All I want to do is fetch a value from another chart from my study. I could use study/price overlay to pull the value in to my main chart, then reference that... and this is likely what I'll have to end up doing. But I coded the direct ability to reference another chart value for exactly this use-case, and having to have both periodicity and number of bars match, makes this feature all but useless. =( Anyway, I guess I'll just use study/price overlay and move on. |