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
SPONSORED LINKS
| Investment management software | Real estate investment software | Investment property software |
| Software support | Real estate investment analysis software | Investment software |
YAHOO! GROUPS LINKS
- Visit your group "amibroker" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
