in the last weeks I tried to exchange data among different Multicharts application, especially between 2 Portfolio Trader sessions.
This is a summary of my tests:
1. EL Collections (https://www.multicharts.com/discussion/viewtopic.php?f=5&t=9870):
The main limit of EL collections is that cannot be used to exchange data among multiple Portfolio Trader windows, since they are different processes.
2. Global Variables (https://www.multicharts.com/discussion/viewtopic.php?f=16&t=10094):
I tried to use Global Variables to exchange data between 2 Portfolio Trader sessions, but it increases the RAM usage too much. They take around 15GB RAM assigning 30,000 variables running on 2 PT windows. To overcome the 10,000 locations limit, I simulated an array (3 columns for 10,000 rows) assigning 10K locations on <numeric>, 10K on <double> and 10K on <string> GV's. I am currently using GV and they are working, but I dislike to work with 90% RAM busy.
3. IOData DLL (https://drive.google.com/open?id=0B_aFLJZIlhWvNmJtYzZrUWNlVTg):
This was a promising solution, but unfortunately the documentation is missing. Based on few online information I have understood that the commands could be the following:
RFile - Open a Read File
InData - Read a File
SFile - Open a Send (Write) File
OutData - Write Data to an Output File (numeric only?)
ADDStringFile - Add a String to the File (text only?)
DelFile - Delete a File
DirCreate - Create a new folder
using the sample code published here: viewtopic.php?t=48991 my PL Editor crashes. Really it doesn’t totally crash but it remains stuck with unusual CPU usage, and the Output window remains blank (I inserted PRINT code for debug). After several minutes I have manually terminated PLE.
I have copied the 4 files found in the original .zip folder <x64> in the path specified in the code (I have a 64-bit machine). Also I tried to place these files in the same .dll folder, but same result.
As I don’t know the syntax of the <DefineDLLFunc> keyword, it is probable that I made something wrong there.
4. SDK EasyLanguage Extension tskit.dll (https://goo.gl/G69vcy - https://www.multicharts.com/discussion/viewtopic.php?t=8498):
I have checked the Extension_SDK PDF manual, and it says “reserved word DefineDLLFunc may be used to declare DLL functions", but it doesn’t explain how to define the .dll. Also any sample code to write and later read data from the same file is missing. May be it could be obvious for developers but this is still unclear to me.
WHAT I AM ASKING:
currently my basic goal is to write and read on a common file from multiple Portfolio Trader sessions, exchanging data between them.
My basic need is to write 3 fields on each row of a txt file:
Symbol (string) , Flag (1 or 0) , Date (numeric).
Has anyone already faced this problem and solved with external .dll or other methods?
Is there any way to optimize the use of GV?
A sample write/read code would be a great help for me.
Exchange data between different Portfolio Trader applications
Questions about MultiCharts and user contributed studies.
2 posts • Page 1 of 1