Creating *.WL Fles Using External Data Source
Author: Harapa
Creation Date: 9/7/2015 8:21 PM
profile picture

Harapa

#1
I have adapted code example presented in "SaveToFile" . It allows me to create a *.WL data file using non *.WL sources such ASCII or Meta Trader. .
CODE:
Please log in to see this code.


1. It works as expected. However, in the process I loose Symbol Name . How can I modify the code to append that in the destination file?. My source file some time have this information and sometime not. So ability to specify this in the code is preferred.

2. What does number at the end is for. Does this indicate Bar Interval?
...BarScale.Minute, 5)


OT:
There is a code example that shows how to create a binary number file based on some criterion.e.g. "if indicator is > 0 write 1 else zero". Could you help me locate that code/ example.

Thanks


profile picture

Eugene

#2
1 - Bars.Symbol, Bars.SecurityName.

2 - Yes it does (see QuickRef).
profile picture

Harapa

#3
QUOTE:
1 - Bars.Symbol, Bars.SecurityName.

This is understood.
But where do I put this in the code eludes me. I am still in learning mode...


QUOTE:
OT:
There is a code example that shows how to create a binary number file based on some criterion.e.g. "if indicator is > 0 write 1 else zero". Could you help me locate that code/ example.


Any help on this one?
profile picture

Eugene

#4
QUOTE:
It allows me to create a *.WL data file using non *.WL sources such ASCII or Meta Trader. .

Oops, I overlooked this. ASCII has "Cache" feature that eliminated the need to create binary files to speed it up. Now ASCII performance is on par with any other. There is a dedicated data provider for MetaTrader 4 files. What's the point in what you're trying to achieve??

QUOTE:
But where do I put this in the code eludes me. I am still in learning mode...

Anywhere after creating the Bars object and before calling .Save.

QUOTE:
Any help on this one?

Help yourself by using Google. Prepend your search query with site:wealth-lab.com/Forum/Posts/