Patrick
This is what happens:
1) In the System Tester I used the following code:
MAType:=OPT1;
MMAType:=OPT2;
MAPeriods:=OPT3;
MMAPeriods:=OPT4;
MA:=
If(MAType=1,ExtFml("ForumDll.VarMOV",C,MAPeriods,S),
If(MAType=2,ExtFml("ForumDll.VarMOV",C,MAPeriods,E),
ExtFml("ForumDll.VarMOV",C,MAPeriods,W)));
MMA:=
If(MMAType=1,ExtFml("ForumDll.VarMOV",MA,MMAPeriods,S),
If(MMAType=2,ExtFml("ForumDll.VarMOV",MA,MMAPeriods,E),
ExtFml("ForumDll.VarMOV",MA,MMAPeriods,W)));
Trend:=
If(MA>MMA,1,
If(MA<MMA,-1,0));
Buy:=If(Trend=1 AND Ref(Trend,-1)<1,1,0);
Buy;
Similar for the Sell signal;
This is crashing the System Tester and the whole MS application (when I hit the "Cancell Simulation" button after 1 min while nothing happened.)
When I used the same formulas for the Expert (obviously the OPT variables were replaced with new ones that refered to integers) it worked OK, but it takes much longer to process the expert signals than when I use the regular Mov() functions.
I used also the same format for Trend definition (Trend Tab in System Tester.):
Trend:=If(MA>MMA,1,0); {for Bullish}
Trend:=If(MA<MMA,1,0); {for Bearish}
Isn't the DLL supposed to perform the same MS functions implemented as a variable parameter call faster?
Any comment will be very much appreciated it.
Regards
Guara