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

[amibroker] Re: Futures single contract code



PureBytes Links

Trading Reference Links

CS,

Thanks for your prompt response.  PositionSize=MarginDeposit appears 
to have resolved the problem.  I am eventually writing a Back test 
where I enter at the Open of the day following the signal.  This 
present code of mine is by way of piece meal testing.  First have I 
got the next open resolved and second - how can I test on a one 
contract basis.  

And thank you for the other tips.

Kind regards,

Keith.



--- In amibroker@xxxxxxxxxxxxxxx, "CS" <res1wgwl@xxxx> wrote:
> Keith,
> I use:
> PositionSize=MarginDeposit; to select single contract buys and/or 
shorts.
> 
> Also, I noticed that you have Buy=Open;
> Since there is an open at every bar, do you want to buy at every 
bar? Buy should tell WHEN you want to buy, not what. For now, you can 
set the buy to occur at the open in the SETTINGS box under the TRADES 
tab.
> 
> At the end of my buy and sell rules, I always put Equity(1);
> This eliminates compound buys and sells, for instance, two buys in 
a row then three sells.
> 
> Frankly, I have never used Addcolumn to debug buy and sell points. 
I always graphically plot out signals. I can see where two signals 
have crossed or not crossed in 10 years of price data before I could 
get to the fifth line of a mass of numbers on a sheet.
> 
> -CS
> 
>   ----- Original Message ----- 
>   From: Keith Newhouse 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Saturday, June 21, 2003 11:05 PM
>   Subject: [amibroker] Futures single contract code
> 
> 
>   Can someone put me right with this setup for test trading single 
>   contracts in Corn.  I appear to have done everything by the book -
 it 
>   finds the buy and sell positions but back test will not show any 
>   executed contacts.
> 
>   I would appreciate some assistance.
> 
>   Thanks in advance,
> 
>   Keith.
> 
>   Corn Futures test.
> 
>   Information
> 
>   Round lot size            1
>   Ticker size            0.25
>   Margin Deposit            600
> 
>   Settings
> 
>   Initial equity            10,000
>   Positions            Long
>   Periodicity            Daily
> 
>   Round lot size            1
>   Tick size            0.25
>   Commissions per trade      $100  (also includes an amount for 
slippage)
>   Margin Requirements      100
> 
>   Test code
> 
>   PositionSize=MarginRequirement=1;
>   Buylevel=Open;
>   Buy=Open;
>   BuyPrice=ValueWhen(Buy,Buylevel);
>   SellPrice=BuyPrice+4.00;
>   stoploss=BuyPrice-1.00;
>   Sell=H>SellPrice OR L<stoploss;
>   Filter=Buy;
>   AddColumn(BuyPrice,"BP",1.2);
>   AddColumn(SellPrice,"SP",1.2);
>   AddColumn(Buylevel,"BL",1.2);
>   AddColumn(stoploss,"SL",1.2);
>   AddColumn(Buy,"B",1);
>   AddColumn(Sell,"S",1);
> 
> 
> 
> 
> 
> 
>         Yahoo! Groups Sponsor 
>        
>        
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/