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

Re: [amibroker] Kalman Filter and/or PREV statement



PureBytes Links

Trading Reference Links




Hi TJ,
 
Thanks for your reply. I've tried that and seems not meet my 
requirement. From the backtest report, I can see under the share column, the 
number of contract started at 3 and it increase or decrease based on the total 
equity even though I have set the number of contract to 2 as the below 
code.
 
In addition, what variable/way I can use to know 
consecutive losses ?
 

SetOption(<FONT color=#ff00ff 
size=1>"InitialEquity", <FONT 
color=#ff00ff size=1>8000 ); <FONT 
color=#000000 face="Courier New" size=1>
numcontract=<FONT color=#ff00ff face="Courier New" 
size=1>2;
MarginDeposit=<FONT color=#ff00ff face="Courier New" 
size=1>2000<FONT color=#000000 face="Courier New" 
size=1>;
PositionSize=<FONT color=#000000 face="Courier New" 
size=1>numcontract * MarginDeposit;
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Tomasz Janeczko 
  
  To: <A 
  href="" 
  title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
  Sent: Saturday, January 17, 2004 5:59 
  PM
  Subject: Re: [amibroker] limiting 
  position size for futures
  
  Hello,
   
   
  Use this:
   
  NumOfContracts = ... your code determining number of 
  contracts you want...
   
  MarginDeposit = 2000;
  PositionSize = NumOfContracts * MarginDeposit;
   
  Hope this helps.
   
  Best regards,Tomasz Janeczkoamibroker.com
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    <A href="" 
    title=kk2628@xxxxxxxxxxxxxxxx>kk2628 
    To: <A 
    href="" 
    title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
    Sent: Saturday, January 17, 2004 9:23 
    AM
    Subject: [amibroker] limiting position 
    size for futures
    
    Hi,
    
    SetOption(<FONT 
    color=#ff00ff>"InitialEquity", <FONT 
    color=#ff00ff face="Courier New">8000<FONT 
    color=#000000> ); 
    PositionSize=-100;//This let me 
    invest all money I have and the contract size just does not make 
    sense.
    Margin deposit is 
    2000;
    What I want to achieve 
    is initially I just start with 2 contracts/trade and maximum contract/trade 
    would be 20 contracts if I make money, and the contract to be reduced 
    to 2 contracts if there is a 6 consecutive losses (irregarless of 
    value). I have been trying to search all the mails and writeup in Amibroker 
    but not able to code this in AFL for backtesting, can someone please help 
    ?
    Thanks
    KK
     Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 
    SUGGESTIONS to 
    suggest@xxxxxxxxxxxxx-----------------------------------------Post 
    AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
    <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    
    
    Yahoo! Groups Links
    
      To visit your group on the web, go to:<A 
      href="">http://groups.yahoo.com/group/amibroker/  

      To unsubscribe from this group, send an email to:<A 
      href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

      Your use of Yahoo! Groups is subject to the <A 
      href="">Yahoo! Terms of Service. 
    Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  
  
  Yahoo! Groups Links
  
    To visit your group on the web, go to:<A 
    href="">http://groups.yahoo.com/group/amibroker/  

    To unsubscribe from this group, send an email to:<A 
    href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
  


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





Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.