Hi, also ich programmiere mit ELCollections.dll, denn damit kannst du auch backtesting machen,. mit Global Varaibale geht das nicht. Ausserdem hat ELC so viele weitere features, einfach genial erkannt und programmiert von Bamboo (im TradeStation Forum veröffentlicht). Ich habe die ELC Kommandos direkt in meinen Codes integriert und sämtliche ELC Funktionen eliminiert, das spart Resourcen. Hier ein Code Beispiel, wie man die REWIND Funktion substituiert:
//MapNN
external method: "ELCollections.dll", int, "MapNN_Clear", double;
external method: "ELCollections.dll", int, "MapNN_Count", double;
external method: "ELCollections.dll", bool, "MapNN_Exists", double, double;
external method: "ELCollections.dll", double, "MapNN_Get", double, double;
external method: "ELCollections.dll", double, "MapNN_New";
external method: "ELCollections.dll", bool, "MapNN_IterMore", double;
external method: "ELCollections.dll", double, "MapNN_IterKey", double;
external method: "ELCollections.dll", double, "MapNN_IterValue", double;
external method: "ELCollections.dll", int, "MapNN_IterNext", double;
external method: "ELCollections.dll", int, "MapNN_Put", double, double, double;
external method: "ELCollections.dll", int, "MapNN_Rewind", double;
//On Destroy Handler
external: "ELCollections.dll", int, "_OnDestroyHandler", IEasyLanguageObject;
#Events
OnDestroy = _OnDestroyHandler;
#End;
cntMapX=[b]MapNN_Count[/b](sessPriceVPO);
N=[b]MapNN_Rewind[/b](sessPriceVPO);
for ii=1 to cntMapX begin
if [b]MapNN_IterMore[/b](sessPriceVPO) then begin
key=[b]MapNN_IterKey[/b](sessPriceVPO);
val=[b]MapNN_IterValue[/b](sessPriceVPO);
// ... here your operation code
[b]MapNN_IterNext[/b](sessPriceVPO);
end;
end;
-swisstrader