looks like the code got chopped off..
I like this idea of writing it to a static variable and
using another afl to aggregate all the signals.
For now i have noticed that i am able to run multiple AB
instances connected to the same IQFeed and get away with the problem (at the
expense of some CPU and memory) but i white boarded a bit of a pseudo code that
might help anyone else (or myself when i have to come back to it) who wants to
explore this solution.
In the individual system files, add something like:
In place of the alert-in-system1
add:
If
Ref(Buy,-1)
StaticVarSet("Buy-in-System1",1)
Else
StaticVarSet("Buy-in-System1",0);
In the
new afl file have something like:
BuySignal1Sent
=0; // using these variables as semaphores
SellSignal1Sent
=1;
If(StaticVarGet(Buy-in-System1))
== 1 and BuySignal1Sent == 0)
{
alertif(?..send
the alert to email ? );
BuySignal1Sent =
1;
SellSystem1Sent =
0;
}
--- In amibroker@xxxxxxxxxxxxxxx, "gariki" <chetan.gariki@xxx> wrote: > > I like this idea of writing it to a static variable and using another > afl to aggregate all the signals. > > For now i have noticed that i am able to run multiple AB instances > connected to the same IQFeed and get away with the problem (at the > expense of some CPU and memory) but i white boarded a bit of a pseudo > code that might help anyone else (or myself when i have to come back to > it) who wants to explore this solution. > > > In the individual system files add something like: > > --- In amibroker@xxxxxxxxxxxxxxx, "treatmentinprogress" brian5545@ > wrote: > > > > another method is to send your signals to a staticvar, then read that > from another afl. > > > > --- In amibroker@xxxxxxxxxxxxxxx, "gariki" chetan.gariki@ wrote: > > > > > > hello folks, > > > > > > For single systems i am able to get intraday email alerts using > alertif > > > by setting the system to scan every 10seconds or so. > > > > > > But how do i run multiple systems in this mode? > > > > > > one option would be to create a gigantic code file with all the > systems > > > in it but it would be horrible to manage or even create as there > will > > > all these name conflicts between multiple systems. What are people > doing > > > to manage multiple systems? are there any trick that let me do > something > > > like: > > > > > > //System-1 > > > Buy = .. > > > BuyPrice = .. > > > Sell = .. > > > SellPrice = .. > > > //end-system1 > > > > > > //System-2 > > > Buy = .. > > > BuyPrice = .. > > > etc > > > //end-system2 > > > > > > Alert if Buy on System1 or System2 > > > > > > Having slightly different names for arrays is probably not useful; > as > > > BuySystem1 and BuySystem2 are ok for generating signal arrays but > for > > > the inbuilt BuyPrice arrays if i change the names they might not be > > > considered by the backtester as they should be. > > > > > > > > > thanks > > > -gariki > > > > > >
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|