Is it possible to output an indicator (e.g. to an ascii file) computed in a 1m chart (output it at 5m intervals) and input it to a 5m chart for display or further processing? This would have to be a dynamic process consistent with streaming charts.
I make use of different timeframes for trading decisions and it is cumbersome looking at indicators across multiple charts.
Size:
Color:
QUOTE:
Is it possible to output an indicator (e.g. to an ascii file) computed in a 1m chart (output it at 5m intervals) and input it to a 5m chart for display or further processing? This would have to be a dynamic process consistent with streaming charts.
Can you explain it to me as you would to a 6 year old kid?
Size:
Color:
Ok, did not mean to be obtuse. I'll make it simple for illustration, using a single indicator.
Let's say I have a 1m chart and compute an RSI using the code editor. I would like to write out the RSI values in real time (while in streaming mode)at 5m intervals to a file (presumably one time stamp value and one RSI value to a line). Let's call the output file "file1m.dat". At the same time there is a 5m chart window open and in streaming data mode. The 5m chart has a code section which reads in all the available data in "file1m.dat" (presumably to a dataseries array) and then can output it for display to the 5m chart through PlotSeries.
I accomplish this now in real time (streaming mode) by watching different charts with different timeframes and comparing indicators in the different timeframes.
For example, I have a workspace with short, intermediate and long timeframes. Trade entries and exits are made in the intermediate timeframe but the decision making process involves watching the short and long timeframe indicators.
Hope this makes it easier to understand my question.
Size:
Color:
If you're comparing indicators in different scales, you can do this all in the same 1m chart. For an example, just set SetScaleCompressed in the QuickRef (F11).
Size:
Color:
Cone, thanks for the suggestion.
I thought about that but the way SetScaleCompressed works is that it is keyed to the native timeframe and higher multiples. I can get 5m indicators in a 1m chart but I cannot get a subsampled 1m indicator in a 5m chart using SetScaleCompressed. I want to see what the 1m indicator is doing but do not want to plot it on a 1m chart scale.
Hope this is clear. In any case I can do what I want to by looking at different charts, it is cumbersome. It also excludes backtesting the multi timeframe idea using lower timeframe data.
In general the biggest handicap I've run into with Wealthlab is using multiple timeframes. Wealthlab is great, and I would not trade it in for anything, but timeframe handling just doe not fit my needs.
To some extent I've gotten around timeframe limits by creating my own ascii datasets and defining them as 1m data but feeding in for example Daily data. I maintain excel spreadsheets that correlate the real to pseudo timeframe. This allows a much more versatile handling of sampling. This is ok for the longer wavelengths but cuts one off from realtime computations. The only constraint comes at the 390m boundary which Wealthlab uses for the end of Day. This is more than a years worth of data and I have not found it to be a limitation for my Daily based 1m pseudo scale.
Size:
Color:
Size:
Color:
Eugene, thanks I'll try this.
Size:
Color:
Eugene,
Looks like this might work for a simple computation, unfortunately in my case there is a more extensive path to getting at the the final indicator. The file output seems to be the simplest solution but I assume it is unavailable in the Wealth Lab coding format otherwise you would have already mentioned it.
I have not thought about it too much but sub timeframe indicators are available as ascii files in a static mode by using the copy to clipboard feature and pasting into a spreadsheet. The indicator can then be input as pseudo bar data after subsampling in the spreadsheet and creating an ascii dataset.
As I said previously this is not a show stopper, just leaves me with a more cumbersome way of trading.
Thanks for the help.
Size:
Color:
I am not much of a programmer but this looks like a concept solution that has potential.
I tested this and it works from within WealthLab, so I'll try to generalize it for reading and writing indicators into ascii datasets.
CODE:
Please log in to see this code.
Size:
Color:
I just worked this all out again, forgetting that we already had that example. Anyway, note that when accessing the 1-minute bars in a higher chart, you have to load
all of them. For Fidelity histories, that's about 600,000 bars, so this process can be slow and inefficient, especially for streaming.
CODE:
Please log in to see this code.
Size:
Color: