Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I need to print to multiple files within a Signal. For example, if the trade is long, I want to write to ABC if the trade is long and to DEF if it is short. Furthermore, the file names depend on the symbol itself. Ex., if the symbol is SPX, I might want to print to C:\DATA\SPXL.csv for long trades and C:\DATA\SPXS.csv for short trades. If the strategy is applied to a different symbol, the name would change.
The documentation indicates the file name is a string expression. However, it appears it is a string constant. If I build a string variable, FILENAME, and use it in the print expression:
print(File(FILENAME), ElDatetoString(Date));
this results in Error(#287)
File name expected here.
It appears Easylanguage is looking for quotation marks, but I'm not sure [and I don't know how to append them.]
Can you help answer these questions from other members on NexusFi?
I don't believe dynamic filenames are currently supported (re: Print - MultiCharts) by Easy/PowerLanguage.
You can always request that they enhance the Print API call to support dynamic filenames though there's no guarantee they'll do that or "soon" (plus it would make it a superset of functionality of TS EasyLanguage, but that's fine). You could also write a DLL yourself and do whatever you want in the external module - quite a bit more involved, but definitely doable.