Apprentice wrote:Will we define the lines from one or several files?
Great idea Apprentice!
I have one too (at end of this post)...
Yes, I think the possibility to include at least two files in the same strategy would be beneficial, for example:
You can define csv file data for valleys ( v ) and peak ( ^ ) separately. ("UP_CSV1", "DOWN_CSV1")
Then strategy can treat those lines differently (to follow trend for example, not go against it)
If it can be possible to include any amount of files that would be superb!
With more than 2+ files, one idea could be to play around and define the "strength" of the lines.
For example, plotting lines on a zigzag from weekly timeframe would carry greater strength than those of a the same zigzag but from daily timeframe. In this way major trendlines and minor trendlines can be detected (And strategy can then be edited to recognize it by output streams, and act accordingly)
So a scenario like this. With 6 files in a strategy, each with 10 rows (for 10 line outputs):
1. CSV_File1_UP
2. CSV_File1_DOWN
3. CSV_File2_UP
4. CSV_File2_DOWN
5. CSV_File3_UP
6. CSV_File3_DOWN
Files 1 and 2 can be a line drawn on "daily" timeframe data and carry strength of "1"
Files 3 and 4 can be for "weekly", strength "2"
Files 5 and 6 can be "monthly" with greatest strength "3"
Don't actually worry about the "strength" I am talking about, this is not part of strategy I request as this logic can be written by the user, just my idea for reason on how to utilize more than 1 file nicely.
So with those 6 files you will have output streams like:
CSV_File2_UP.Line3
CSV_File2_UP.Line7
CSV_File2_UP.Line1
CSV_File1_DOWN.Line10
CSV_File3_UP.Line4
CSV_File3_DOWN.Line2
Etc, etc... I hope this make sense so far
If this is a good solution, great. But if adding so many files in one strategy creates a performance issue, perhaps a additional parameter could be added at end of line, to specify if the line is treated as DOWN or UP (this is decided by user, don't worry about slope or line starting position points). This way you can define both up and down lines in same file, but their output streams will be respected according to the up or down flag. And also a "priority" [OPTIONAL] number at the very end to account for the different output stream user wants for example to count the strength of the lines according where they from. So inside file would look like this:
- Code: Select all
06/30/2017 00:42,84.3165,06/30/2017 05:24,85.8775,UP,"3"
06/30/2017 00:42,84.3165,06/30/2017 06:15,86.0485,DOWN,"1"
06/30/2017 00:42,84.3165,06/30/2017 06:48,86.0225,UP,"1"
06/30/2017 00:42,84.3165,06/30/2017 07:31,86.0525,DOWN,"2"
The "UP" and "DOWN" will be used to draw the lines differently (red or green). But in an actual strategy you wouldn't see the lines since it is not an indicator so color makes no sense of course. Just different output streams names.
So what I mean is, the goal is to have individual output streams for the lines to not treat them all the same, that's the idea, if this can be defined in one file with additional parameters like "UP/DOWN" and priority number that's great, if it is better done with many files that is good too.
If my long post is unclear I will be happy to explain this further and contribute with code development myself