[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help! Multiple Signal Strategy in TS2K



PureBytes Links

Trading Reference Links

I'm tearing my hair out with an Easylanguage/TS2K problem that I can't see
the answer to. Hopefully someone can help!!


I have 3 "signals" which are actually self-contained systems. They all have
code something like this:

	Print("XYZSystemBar=",CurrentBar);
	if CurrentBar = 1 then begin
		{initialise stuff here}
	end;

Inside this condition I declare external DLLs, retrieve global variables,
setup output files and the like.
(Every system uses the same inputs NAMES and mostly the same VARIABLES names
but they don't appear to interfere with each other...)

When I run the system singly (ie inside a strategy which contains any ONE of
these signals) everything runs fine but when I put all three together the
output from the print function above starts on the bar after the condition.

So if all 3 signals have the code above then I will see first:

ThisSystem=2
ThatSystem=2
NextSystem=2

missing out my initialisation!


If I set the signals up like this for each signal:

Signal 1:

	Print("ThisSystemBar=",CurrentBar);
	if CurrentBar = 1 then begin
		{initialise stuff here}
	end;


Signal 2:

	Print("ThatSystemBar=",CurrentBar);
	if CurrentBar = 2 then begin
		{initialise stuff here}
	end;


Signal 3:

	Print("NextSystemBar=",CurrentBar);
	if CurrentBar = 3 then begin
		{initialise stuff here}
	end;


This results I see FIRST are:

ThisSystem=4
ThatSystem=4
NextSystem=4


Bizarre?

If you have ever experienced this (many people must have I hope), please let
me know how you solved it!


Thanks,

Robert