PureBytes Links
Trading Reference Links
|
I know that hedge betting is generally a fool's bet. But there may be some rare instances when I want both a Long position and a Short position open at the same time (still experimenting with that concept).
Anyway, I can't get the backtester to have two such trades open simultaneously and hope someone can be of help. According to my understanding the below code placed at the begining of the formula (especially the bolded lines) are correct for hedging. And in the backtester General Settings I should set Positions to "Long and Short", and uncheck the box for "Reverse entry signal forces exit". I have done that, but still the backtester does not allow a Long or Short to be open when the reverse is already open.
Any help much appreciated.
SetBarsRequired(10000, 10000); SetFormulaName("1-0 Initial Attempt"); SetOption("CommissionAmount", 4.00); SetOption("CommissionMode", 2); SetOption("InitialEquity", 100000); SetOption("MaxOpenPositions", 2); SetOption("PriceBoundChecking", 1); SetOption("UsePrevBarEquityForPosSizing", 1); SetTradeDelays( 1, 1, 1, 1 ); SetPositionSize(1,spsShares); SetOption( "ReverseSignalForcesExit", 0 );
__._,_.___
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
__,_._,___
|