I'm guessing that most brokers will not allow you to do this, especially in a single account. I specifically setup multiple accounts with Interactive Brokers to be able to trade both sides of the market at the same time. The first time I tried to do it, Interactive Brokers would not allow me to execute an opposite direction trade in my second account giving me a message that it violated some SEC rule. However you can probably get around this if you trade two accounts at two unrelated brokers. Maybe the rules are different in other countries. The way I handle trading both directions now is to trade related securities in opposite directions (e.g. for US index futures: YM, NQ, ER2, ES) although I rarely have the need to do it. Over the last year, I did it the 3 times to hedge my open positions the days the CBOT exchange crashed.
Since your long and short trades are independent of each other, why not divide your initial equity in half and test the long and short trades as separate systems? Regards, David _____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of dralexchambers Sent: 04/16/2007 3:05 PM To: [email protected] Subject: [amibroker] Help needed! - Can't Buy and Short on the same bar Hi, I am testing an intrday trading system where I place a buy order and a short order together on the 14:00 bar. I then set a stop loss for each order at 20 points and a take profit order at 10 points. However, Amibroker doesn't seem to execute both buy and sell orders on this bar in the backtester. It only executes a buy or a sell order, and never both at 14:00 - even though there are valid short and long entries on the 14:00 bar. Can anyone help, Alex Here is a summary of my system, as the system code is very long: [on 14:00 bar] Buy = 1; Short = 1; BuyPrice = Open + 2 points; ShortPrice = Open - 2 points; [for every bar after 14:00 each day] Sell if low of bar < LongStopLoss sell if high of bar > LongTakeProfit cover if high of bar > ShortStopLoss cover if low of bar < ShortTakeProfit
