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

Re: [amibroker] Forex AA settings - help me..



PureBytes Links

Trading Reference Links

I'm not sure what problem you're having...
  ----- Original Message ----- 
  From: Grant Noble 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, June 01, 2006 8:39 PM
  Subject: Re: [amibroker] Forex AA settings - help me..


  Is nobody out there backtesting forex ? I'm not after state secrets here 
  people, just an idea of how to proceed.. Ta, GRANT

  Grant Noble wrote:
  > Hi all, have been coding attempts to allow backtesting forex and have 
  > reached a point that I can't seem to move past.
  >
  > In theory it seems simple enough:
  > - standard contract = 100,000xCCY1
  > - a one point move in CCY2 is worth 10xCCY2 (or 1000xCCY2 if CCY2 is JPY..)
  > - ticksize is 0.0001 (or 0.01 if CCY2 is JPY..)
  > - margin is 2% of CCY2
  >
  > My code follows. I suspect it's not right but it gives pretty close 
  > results to hand tests. Except for JPY which is never picked up by AA 
  > (even if trades are picked up by Exploration).
  > I'm going nuts here people - any feedback appreciated.
  >
  > BTW I also have questions about Forex conversions to base currency but 
  > Marcin has promised a KB article soon. :-)
  >
  > Regards, GRANT
  >
  > *<code>*
  > if ( StrRight(  Name (), 3 ) == "JPY" ) {
  >     TickSize = 0.01;
  >     PointValue = 1000;
  > } else {
  >     TickSize = 0.0001;
  >     PointValue = 100000;
  > }
  > // FOREX settings
  > SetOption( "FuturesMode", True);                    // use margin 
  > deposit and point value in calculations
  > RoundLotSize = 1;                                    // whole contracts only
  > lotSize = 100000;                                    // full contract 
  > 100,000 base currency
  > MarginDeposit = lotSize * 0.02;                    // margin 2% of 
  > position value
  > contracts = 1;                                        // contracts to 
  > acquire
  > SetPositionSize( contracts, spsShares );             // spsShares = size 
  > expressed in shares/contracts
  > *</code>*
  >
  >
  >
  >
  >
  >
  > 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 other support material please check also:
  > http://www.amibroker.com/support.html
  >
  >  
  > Yahoo! Groups Links
  >
  >
  >
  >  
  >
  >
  >
  >
  >
  >
  >   


  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 other support material please check also:
  http://www.amibroker.com/support.html





  SPONSORED LINKS Investment management software  Real estate investment software  Investment property software  
        Software support  Real estate investment analysis software  Investment software  


------------------------------------------------------------------------------
  YAHOO! GROUPS LINKS 

    a..  Visit your group "amibroker" on the web.
      
    b..  To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx
      
    c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


------------------------------------------------------------------------------