I have three questions.
1. In some code that I'm porting over from TradeStation, the code relied on the fact that a chart can be loaded with a certain number of days. For example, 100 days back for a 5 minute chart. However, eSignal does not load sufficient data when you open a chart and I cannot find a way to make it do so. If my efs code requires n days of data, how can I do this in the efs. (For example, can I reference data before the first bar to cause more data to be loaded?)
2. How can I convert open/high/low/close data from floating point to integer. For example, the e-mini is traded in 1/4's and let's say the open is 985.25. How do I convert it from 985.25 to 98525 - which is how you display it? Specifically, how do I determine the scaling multiplier, which may be different for different symbols? This is important because I have 10,000 lines of dll code that uses integer arithmetic for speed reasons and I can't re-write all this code.
3. The documentation I have mentions that strings can be passed between an efs and a dll. It does not describe how you actually do this but someone (Dion, I think) on you support team told me strings are passed by reference, specifically as far pointers. I have tried a variety of ways of passing a string from the dll and into an efs varibale but have been unsuccessful. Can you please show me an example piece of code - both the C code for the dll and the efs code - that allows a string to be returned from the dll and into an efs variable.
The following looks like it should work but it does not. It does return the expected string length which means "Hello\n" was successfully copied into far char* str. But the efs does not see the modified str variable.
==== EFS CODE
dll = new DLL("c:/eSignal.dll");
function preMain() {
dll.addFunction("getStr",DLL.FLOAT,DLL.STDCALL,"ge tStr",DLL.STRING);
}
function main() {
str = "1234567890"; // malloc 10 bytes of string space
rc = dll.call("getStr",str);
debugPrintln(rc + " " + str);
}
==== DLL CODE
float __stdcall getStr(far char *str) {
strcpy(str,"Hello\n");
return((float)strlen(str));
}
-----------------------------------------------------------------
Thank you all for your help and yes .................when we get these last few issues addressed you will have the ablility to run the T-3 Fibs ProTrader automated fibonacci areas on E-signal ... www.nss-t3.com thanks John Novak
1. In some code that I'm porting over from TradeStation, the code relied on the fact that a chart can be loaded with a certain number of days. For example, 100 days back for a 5 minute chart. However, eSignal does not load sufficient data when you open a chart and I cannot find a way to make it do so. If my efs code requires n days of data, how can I do this in the efs. (For example, can I reference data before the first bar to cause more data to be loaded?)
2. How can I convert open/high/low/close data from floating point to integer. For example, the e-mini is traded in 1/4's and let's say the open is 985.25. How do I convert it from 985.25 to 98525 - which is how you display it? Specifically, how do I determine the scaling multiplier, which may be different for different symbols? This is important because I have 10,000 lines of dll code that uses integer arithmetic for speed reasons and I can't re-write all this code.
3. The documentation I have mentions that strings can be passed between an efs and a dll. It does not describe how you actually do this but someone (Dion, I think) on you support team told me strings are passed by reference, specifically as far pointers. I have tried a variety of ways of passing a string from the dll and into an efs varibale but have been unsuccessful. Can you please show me an example piece of code - both the C code for the dll and the efs code - that allows a string to be returned from the dll and into an efs variable.
The following looks like it should work but it does not. It does return the expected string length which means "Hello\n" was successfully copied into far char* str. But the efs does not see the modified str variable.
==== EFS CODE
dll = new DLL("c:/eSignal.dll");
function preMain() {
dll.addFunction("getStr",DLL.FLOAT,DLL.STDCALL,"ge tStr",DLL.STRING);
}
function main() {
str = "1234567890"; // malloc 10 bytes of string space
rc = dll.call("getStr",str);
debugPrintln(rc + " " + str);
}
==== DLL CODE
float __stdcall getStr(far char *str) {
strcpy(str,"Hello\n");
return((float)strlen(str));
}
-----------------------------------------------------------------
Thank you all for your help and yes .................when we get these last few issues addressed you will have the ablility to run the T-3 Fibs ProTrader automated fibonacci areas on E-signal ... www.nss-t3.com thanks John Novak
Comment