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

RE: [amibroker] Help needed! - Can't Buy and Short on the same bar



PureBytes Links

Trading Reference Links

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: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of dralexchambers
Sent: 04/16/2007 3:05 PM
To: amibroker@xxxxxxxxxxxxxxx
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

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___