How to use Array variables
Forums › ProRealTime English forum › ProBuilder support › How to use Array variables
- This topic has 29 replies, 5 voices, and was last updated 7 months ago by PeterSt.
-
-
07/09/2022 at 8:05 AM #19703107/09/2022 at 8:38 AM #197033
You can store all data, including tick data, in an array
Yes. And now from within a bar. If you can do that, please show that. It would be the most interesting.
And the answer is not : then make a smaller timeframe (you tried that twice already – haha).07/09/2022 at 8:41 AM #197034Something else I thought of after my post early this morning : it is ridiculous that this is not possible. The data DOES pass there (Indicator code). We can do all with it, except for storing it. Knowing a but about programming, it is beyond me why this is prohibited. Indicator code (or the parser of it) must be a veeeery strange animal.
07/09/2022 at 8:41 AM #19703507/09/2022 at 8:43 AM #19703607/09/2022 at 8:44 AM #197037JS, I don’t think you understood the casus;
Store all the values you see passing from an indicator, in an array. Watch the indicator moving in its current (rightmost) bar. Up-down-up. That would be three values. Store those …
(please – haha)07/09/2022 at 8:46 AM #19703807/09/2022 at 9:16 AM #19704007/09/2022 at 10:41 AM #197049Though I think we are flogging a dead horse on this question, I beginning to understand the situation a bit better.
Market data is made up of several data feeds, this gives the ticker name; exchange; OHLCV, bid/ask, timestamps and other parameters. PRT has access to at least some if not all of these feeds at the package level.
But at the coding level it seems access is limited to the OHLCV and a timestamp.
Now the tick time frame is at the highest resolution of this data available and all other time frames seam to be calculated from it. Drawing a parallel with calculating a average….
The candles on time frame are just the ‘SUM’ of the ticks that fall in the candle’s time period. So if you have only got access to the result of that sum, like an average, you can’t interrogate it to find the values that made it up.
Also when you see the current candle move, what your seeing is the current sum for that candle, this sum is increased when new ticks come in, but when it closes its just the dumb value of a sum of ticks it always was.
Regarding real time, all time, time frames are only updated on close/time period with the tick updated per tick not in a time period. On the code side you can do quite a bit of processing between open and close of a candle but from the above, how the time frames are setup an built restricts the data available to be processed and manipulated. This may also explain why the TIMEFRAME instruction only do time and not ticks.
Though on a technical level it may not be done this way, the dress seems to fit. Another wrong path in the maze mapped out.
I’ll leave with this, ‘Do nothing and your potential is limitless, do everything to your potential and your limited!’
No indeed… not this way!
07/09/2022 at 10:55 AM #197051… you can’t interrogate it to find the values that made it up. …
Actually you can, using the multiple time frame support and set it to the lowest timeframe available (1 second, as ticks cannot be used).
There are some features that would be highly appreciated:
- using non-time based charts (ticks, rengo, etc…) in strategies
- adding more data types (mainly alphanumeric)
but that would imply changing the logic of the whole platform and rewrite it from scratch. I don’t know if this will ever be possible… mainly due to time and costs.
1 user thanked author for this post.
07/09/2022 at 4:58 PM #197063Thanks for the clarification Rob, wasn’t meaning to imply that you couldn’t interrogate values of lower time frames from a higher one. But that, the platform logic you mentioned, from my observations concur, and probably that’s why the TIMEFRAME instruction doesn’t go to the tick level, so we could interrogate that levels data.
I’m running on philosophy that, ‘you don’t know the door’s locked until you try to open it!’
Regards
07/09/2022 at 6:01 PM #197064Every time it turns out that you have no idea how it works,
It is always interesting to see how people first change the question and next think they have the answer correct (and bash on top of that).
Did you ever read the (repeated) question from the OP ?Now, still waiting for your solution. I still think it is impossible, thus no need to get in some kind of defense mode.
I hope we can behave somewhat.07/09/2022 at 8:23 PM #19706805/03/2024 at 8:27 AM #232235But I don’t want the array to store values based on time change but rather based on price change. Do you get what I mean? This means in the current bar of any time frame, every time the Price changes, I want to continuously store that price change in an array from the time the current bar opens until the current bar closes. Then I want to display the values being stored in the array on the screen (either on the chart or on a new panel).
05/03/2024 at 9:25 AM #232242Do you get what I mean?
JS does not.
Maybe if you ask him nicely he’ll come up with the solution. So far he did not.In PRT this can’t be done (I say, until someone shows how to do it). Other platforms can do this. Some mimic it to some (very workable) degree by offering a TimeFrame of 1ms.
-
AuthorPosts
Find exclusive trading pro-tools on