I would like to put these codes in just one Analysis-Window,
the logic would be…
scan IBM, if there is any cross (buy or sell)
then run buy-ibm.exe or sell-ibm.exe
and after scan IBM, also …
scan INTC, if there is any cross (buy or sell)
then run buy-intc.exe or sell-intc.exe
SetForeign("ibm");
Buy = Cross( Close, MA( Close, 10) ) ;
Sell = Cross( MA( Close,10), Close ) ;
AlertIF( Buy, "EXEC buy-ibm.exe", "SOME_PARAM", 2,1+2 );
AlertIF( Sell,"EXEC sell-ibm.exe", "SOME_PARAM", 2,1+2 );
RestorePriceArrays();
SetForeign("intc");
Buy = Cross( Close, MA( Close, 10) ) ;
Sell = Cross( MA( Close,10), Close ) ;
AlertIF( Buy, "EXEC buy-intc.exe", "SOME_PARAM", 2,1+2 );
AlertIF( Sell,"EXEC sell-intc.exe", "SOME_PARAM", 2,1+2 );
RestorePriceArrays();
looks like i still failed, so currently i put each code in two analysis-windows, but soon i will be in trouble if i need to scan 20-or 30 stocks.
any help ?
Thank you