Re: [Komunitas AmiBroker] Yang hobby fishing
Hello thx for reply Biasa di nusa penida tp skrg udah sepi ikan kayanya.lg cr spot baru di jawa barat. Ada saran?pulau seribu bagian utara katanya bgs? Atau pulau umang gmn? Kita sewa yatch aja, rame2 10 org bermalam di laut sambil bahas saham.pasti seru. Ikannya range 6-15 kg kayaknya. Sent from my AXIS Worry Free BlackBerry® smartphone -Original Message- From: ashiang1...@yahoo.co.id Sender: amibroker-4-bei@yahoogroups.com Date: Thu, 9 Sep 2010 05:32:15 To: amibroker-4-bei@yahoogroups.com Reply-To: amibroker-4-bei@yahoogroups.com Subject: Re: [Komunitas AmiBroker] Yang hobby fishing Biasanya mancing dimana Pak. Sent from my BlackBerry® powered by Sinyal Kuat INDOSAT -Original Message- From: astrona...@gmail.com Sender: amibroker-4-bei@yahoogroups.com Date: Thu, 9 Sep 2010 05:14:45 To: cuananalysis-mem...@yahoogroups.com; cuananaly...@yahoogroups.com; amibroker-4-bei@yahoogroups.com; wave_tra...@yahoogroups.com Reply-To: amibroker-4-bei@yahoogroups.com Subject: [Komunitas AmiBroker] Yang hobby fishing Dear friends.adakah yg hobby mancing di laut?yang biasa trolling,jigging atau mancing dasar? Ngeplan mancing bareng yuk..pls reply ya. Call me 08128850 Gema Sent from my AXIS Worry Free BlackBerry® smartphone Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker-4-bei/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/amibroker-4-bei/join (Yahoo! ID required) * To change settings via email: amibroker-4-bei-dig...@yahoogroups.com amibroker-4-bei-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: amibroker-4-bei-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [Komunitas AmiBroker] SOS AMI ku crash
Ada yang bisa bantu, apakah AMI yg crash perlu diinstall ulang? Thanks a lot, FC Sent from my BlackBerry® powered by Sinyal Kuat INDOSAT -Original Message- From: fauzi_chair...@yahoo.com Sender: amibroker-4-bei@yahoogroups.com Date: Thu, 9 Sep 2010 01:45:33 To: amibroker-4-bei@yahoogroups.com Reply-To: amibroker-4-bei@yahoogroups.com Subject: [Komunitas AmiBroker] SOS AMI ku crash Pak Dendo tolong AMI saya crash tidak bisa dimasuk saya coba tekan try to recover tetep jawaban AMI for win32 has encountered a problem and needs to close.., penyebabnya mungkin waktu terkhir laptop mau di turn of, tidak sadar saya melakukan exit juga dari AMI, nah ketika akan buka AMI lagi jadi tidak bisa. Mohon bantuan Pak Dendo, mumpung ada waktu liburan mau belajar AMI dari Pak Iswandi n Pak Kenzie, thanks a lot ya Sent from my BlackBerry® powered by Sinyal Kuat INDOSAT Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker-4-bei/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/amibroker-4-bei/join (Yahoo! ID required) * To change settings via email: amibroker-4-bei-dig...@yahoogroups.com amibroker-4-bei-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: amibroker-4-bei-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [Komunitas AmiBroker] tolong tanya
terima kasih mas CT atas replynya, sarannya saya coba dulu. mungkin ada temen lain yg pernah coba bisa bantu? atu mas Dendo? thx From: Christopher Tahir chris_ta...@ymail.com To: amibroker-4-bei@yahoogroups.com amibroker-4-bei@yahoogroups.com Sent: Thu, September 9, 2010 8:57:05 AM Subject: RE: [Komunitas AmiBroker] tolong tanya Halo,sy jg hobi bongkar2 ami. 1. Eod bs di donlot pake AQ plh Y!Historical ato Current 2. Utk save, copy file broker.master atau yg sejenisnya di folder data. Kalo ga salah ada 3 filenya. Hehe Best Regards, Christopher Tahir Blog: http://ez-stock.blogspot.com MSN: chris_ta...@hotmail.com YM: chris_ta...@ymail.com Mail to my Y!Group: ez-stock-subscr...@yahoogroups.com -Original Message- From: yongky wongso Sent: 08/09/2010 7:52:40 PM Subject: [Komunitas AmiBroker] tolong tanya halo kawan2 ami saya ada pertanyaan mengenai ami, mohon dibantu. 1. kalau saya mau update data EOD untuk AMI , saya harus pakai AMI QUOTE, atau cukup IMPORT ASCII (tab FILE-nya amibroker) ? 2. misal saya pasang garis trendline, fibo, dll di amibroker saya (di komputer), gimana caranya agar saya bisa tampilin di laptop saya? apa ada file tertentu yg harus saya copy dan paste kan ke laptop saya. terima kasih
[Komunitas AmiBroker] (unknown)
Jum'at udah Lebaran nih ♥aku ♥mungkin ♥banyak ♥salah ♥pada ♥kamu ♥sengaja ♥atau ♥tidak ♥jadi ♥sebelum ♥masuk ♥Idul Fitri ♥aku ♥mohon ♥maaf ♥lahir ♥bathin ♥kepadamu ♥kepada ♥semua ♥setulus:) ♥hati ♥ku ♍öЂöN ♍ƏƏF £ƏЂΐЯ ϑƏN ßƏTΐN Slamat Hari Raya Idul Fitri 1431 H Minal Aidzin Wal Faidzin Di M'fin semuax ya KESALAHAN qw ya yg disengaja atau PůŰűn° °yg tdk disengaja..di muLai dari A - Z meLiputi: A-ngkuh B-oh0nk C-uek D-engki E-jek F-itnah G-osip H-ina I-ngkar J-utek K-ejam L-upa M-arah N-akaL O-L0k P-eLit Q-ikir R-ese' S-otOy T-ega U-siL W-ah pa Lagi yaa ?! X-kitin hati Y-ang aneh kayak Z-ew0t Sekali Lagi dweh biar Afdol : ♍öЂöN ♍ƏƏF £ƏЂΐЯ ϑƏN ßƏTΐN. Sent from my Noe'sBerry® Good Day Good Luck 4 U All ! ☎ : 317 251 56
[Komunitas AmiBroker] Mohon Maaf Lahir Batin
Buat rekan2 yg merayakan, saya dan keluarga mengucapkan Minal Aidin Walfaizin, Mohon Maaf Lahir Batin, Selamat Hari Raya Idul Fitri 1 Syawal 1431H, Mohon Maaf Lahir Batin Sent from my BlackBerry® powered by Sinyal Kuat INDOSAT Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker-4-bei/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/amibroker-4-bei/join (Yahoo! ID required) * To change settings via email: amibroker-4-bei-dig...@yahoogroups.com amibroker-4-bei-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: amibroker-4-bei-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [Komunitas AmiBroker] Mohon Maaf Lahir Bathin
Kami juga mohon ma'af lahir bathin Start Small Think Big Go Now -Original Message- From: Joti Joti satthi_...@yahoo.com Sender: amibroker-4-bei@yahoogroups.com Date: Thu, 9 Sep 2010 19:30:33 To: Komunitas Amibrokeramibroker-4-bei@yahoogroups.com Reply-To: amibroker-4-bei@yahoogroups.com Subject: [Komunitas AmiBroker] Mohon Maaf Lahir Bathin Dear All, Kepada saudara-saudara / teman-teman yang merayakan Idul Fitri, saya turut mengucapkan : SELAMAT IDUL FITRI, Mohon Maaf Lahir Bathin. Rgds, Iwan.
[Komunitas AmiBroker] Selamat hari Raya Idul Fitri
Untuk teman-teman, saya mengucapkan selamat hari raya Idul Fitri,mohon maaf lahir batin,dan sukses selalu Terima kasih salam sejahtera == Best Regards, Colonel Change is the law of life. And those who look only the past or present are certain to miss the future
Re: [Komunitas AmiBroker] SOS AMI ku crash
Pak Dendo tolong saya bisa dipandu: kasus ami saya crash bukan karena formula AFL yg baru dipasang, maka sesuai petunjuk Pak Dendo, saya tidak perlu mendelete kedua folder layout? Dan langsung saya reinstall? Kemudian cara reinstall itu bagaimana, ya? Maaf gaptek, Thanks a lot Sent from my BlackBerry® powered by Sinyal Kuat INDOSAT -Original Message- From: amibrokerfr...@yahoo.co.id Sender: amibroker-4-bei@yahoogroups.com Date: Thu, 9 Sep 2010 11:03:56 To: AmiBroker Milistamibroker-4-bei@yahoogroups.com Reply-To: amibroker-4-bei@yahoogroups.com Subject: Re: [Komunitas AmiBroker] SOS AMI ku crash Pak Fauzi, Coba reinstall ami nya. Kalau crashnya karena formula (AFL) yang bareu dipasang Coba delete dulu file di folder C:/program files/AmiBroker/layout dan C:/program files/AmiBroker/IMQ AmiBroker/layout Regards, Dendo -Original Message- From: fauzi_chair...@yahoo.com Sender: amibroker-4-bei@yahoogroups.com Date: Thu, 9 Sep 2010 06:50:02 To: amibroker-4-bei@yahoogroups.com Reply-To: amibroker-4-bei@yahoogroups.com Subject: Re: [Komunitas AmiBroker] SOS AMI ku crash Ada yang bisa bantu, apakah AMI yg crash perlu diinstall ulang? Thanks a lot, FC Sent from my BlackBerry® powered by Sinyal Kuat INDOSAT -Original Message- From: fauzi_chair...@yahoo.com Sender: amibroker-4-bei@yahoogroups.com Date: Thu, 9 Sep 2010 01:45:33 To: amibroker-4-bei@yahoogroups.com Reply-To: amibroker-4-bei@yahoogroups.com Subject: [Komunitas AmiBroker] SOS AMI ku crash Pak Dendo tolong AMI saya crash tidak bisa dimasuk saya coba tekan try to recover tetep jawaban AMI for win32 has encountered a problem and needs to close.., penyebabnya mungkin waktu terkhir laptop mau di turn of, tidak sadar saya melakukan exit juga dari AMI, nah ketika akan buka AMI lagi jadi tidak bisa. Mohon bantuan Pak Dendo, mumpung ada waktu liburan mau belajar AMI dari Pak Iswandi n Pak Kenzie, thanks a lot ya Sent from my BlackBerry® powered by Sinyal Kuat INDOSAT Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker-4-bei/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/amibroker-4-bei/join (Yahoo! ID required) * To change settings via email: amibroker-4-bei-dig...@yahoogroups.com amibroker-4-bei-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: amibroker-4-bei-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[Komunitas AmiBroker] Selamat Hari Raya Idul Fitri
Buat rekan2 Komunitas Amibroker yg muslim, saya mengucapkan: Selamat Hari Raya Idul Fitri 1431H. Taqobbal Allahu minna wa minkum taqobbal ya kariim. Semoga Allah SWT menerima amal ibadah kita semua dan kembali ke fitri. Mohon maaf lahirbatin. Buat rekan2 yg lain, selamat berlibur (panjang) dan menikmati cuan :) Wassalam, Abdul Halim @Sidoarjo Sent from my BlackBerry® Apabila membutuhkan software AmiBroker, Realtime Intraday Data Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker-4-bei/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/amibroker-4-bei/join (Yahoo! ID required) * To change settings via email: amibroker-4-bei-dig...@yahoogroups.com amibroker-4-bei-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: amibroker-4-bei-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [amibroker] Re: Help with Code for MA Cross Over - Ribbon Indictor
Thanks guys for the help to resolve my problem with the ribbon indicator code. It is greatly appreciated. If I can just ask for help one more time please. I am sure it is very simple to do but as much as I play around, I can't get the percent band code below to lock to a MA instead of the close. Can anyone suggest what I need to do? Many thanks again Ken _SECTION_BEGIN(Percent Bands); P = ParamField(MA1(Close,100,-1); Periods = Param(Periods, 15, 2, 300, 1 ); Width = Param(Width%, 2, 0, 10, 0.05 ); Color = ParamColor(Color, colorCycle ); Style = ParamStyle(Style); CenterLine = MA( P, Periods ); Plot( (1 + Width * 0.01) * CenterLine, %EnvTop + _PARAM_VALUES(), Color, Style ); Plot( (1 - Width * 0.01) * CenterLine, %EnvBot + _PARAM_VALUES(), Color, Style ); _SECTION_END();
Re: [amibroker] Amibroker commissions in other currencies.
Hi, In Symbol | information | menu You can set contract specification for each future. I hope it helps you. Best regards Le 08/09/2010 21:26, pipadder a écrit : Hi, After a lengthy period of evaluation I recently purchased Amibroker. I am very happy with its performance, but of course there are a number of things I don't know how to do yet, so I thought I'd start by asking the one that is nagging me the most at the moment. I am using Amibroker for backtesting mechanical systems in the forex market, and this means that I have to operate and backtest using currencies different from the base (account) currency (which for me is USD). Fortunately, the multiple currency support makes this very easy. For example, when backtesting a system with USDJPY I just need to specify JPY in the currency field of the corresponding Symbol--Information window. Later Amibroker uses the multicurrency support to translate the results to my account currency and that is that. The problem I am finding is that Amibroker does not seem to do the same (currency conversion) with the commissions of the transaction: it only lets you specify this amount in the base currency (USD), and not in the quote currency (second currency) of the pair. To give you an example, if I am working with GBPUSD and I know the spread of the pair is 3 pips (and since this equates to 30 USD per full lot) I just need to include a commision of 15$ per share (so, 30$ roundtrip) and the results are perfectly accurate. Unfortunately, when working with USDJPY a commision of 3 pips means 3000 JPY, but of course the value of this commision in dollars is going to depend on the exchange rate. Since I have not found a way to specify the commisions in the quote currency (JPY), I am getting inaccurate results for them. I can try to get get approximate results (with the exchange rate not far from 100 then 3000 JPY are not far from 30 USD, so I use just that as fixed commision), but not being able to obtain accurate ones is bothering me a lot. More so since the errors compound themselves when evaluating system performance through the years. Does anybody know how to do this properly? Is there a workaround?? Thanks in advance!!
[amibroker] Re: AIRAP - fitness function
There is also an article on your reference site on MaxDd http://www.intelligenthedgefundinvesting.com/ch06.html. In fact, there were other performance measures for you to consider. while I'll need sometime to look at the AIRAP more closely. I think it is important to point out that it is just as important to understand how different ways of applying your data to generate statistical fitness can affect your final answer just as much as choosing different fitness functions. For example, consider the follwoing Rate of return calculation: Period :Discrete Rate Continuously compounded 1 100% 0.693 =log(1+1) 2 -50% -0.693 =log(1-0.5) Avg 0.25 0 As we can see the arithmetic average, or the mean of the discrete rates of return, is plus 25% per period. Yet the investment has simply doubled and then halved to return to its original value at time 0. --- In amibroker@yahoogroups.com, tf28373 tom...@... wrote: Hello everyone I have been working on the choose of fitness function following the Howard Bundy's advices in his Quantitative Trading Systems and come across M. Sharma's Alternative Investments Risk Adjusted Performance (AIRAP). The equation of it is as following: AIRAP = [ E pi*(1+TRi)(1-c) ] 1/(1-c) - 1, where TRi - ith period total fund return (in my opinon it can also be ith trade net return), c - risk aversion parameter (author suggests to set its value to c=4), i=1,...,N - number of periods (as for me it can be number of trades), pi - the probability of the ith period's total return (according to the author it can be replaced with 1/N). (For futher information please check this working paper: http://www.intelligenthedgefundinvesting.com/pubs/rb-ms01.pdf http://www.intelligenthedgefundinvesting.com/pubs/rb-ms01.pdf .) M. Sharma argues that this measure captures all higher moments, penalizes for higher volatility and leverage (downside risk is penalized more) and has all merits of Sharp ratio, though without its limitations and disadvantages. I have carried out some simulations on the artificial returns of different distributions and indeed it makes some difference. Nevertheless what I am suspicious about is the fact that it was the very first time I found this objective function even though it was created by Sharma about 5 years ago. As for me it can mean that AIRAP is in fact far from being effective or/and practical fitness measure at least for trader like us and nobody use it (maybe I am wrong...). Another issue that concerns me a bit is omission of MaxDrawDown in the equation, which - at least for me - is a very important risk measure. According to many experienced wise people writing on this forum (like ex Mr Bundy), an effective fitness function shouls take Max DD or some comparable risk measure into consideration in order to be really useful. What do you think about AIRAP? Should I proceed with utilizing this function? I am looking forward to your response. Thank you in advance. Tomasz
Re: [amibroker] Backtest multiple systems across multiple timeframes
hi Matthias, I do similar code when optimizing, see below. So I can not tell what the problem is. My first guess was a memory problem. I couldn't get it to work on a 1-minute database but I could on a 5-minute database. So maybe send your specific error to support. Second question indeed you need to expand the hourly system to the timeframe you want to do your calculations (15min). Takes some work to get it right, regards, Ed if (Name() == +CL#) { thresholdEquityCL = Optimize(thresholdEquityCL,1370, 50, 5000, 10); thresholdEquity = thresholdEquityCL; } else if (Name() == @EMD#) { thresholdEquityEMD = Optimize(thresholdEquityEMD,550, 50, 5000, 10); thresholdEquity = thresholdEquityEMD; } else if (Name() == @TFS#) { thresholdEquityTF = Optimize(thresholdEquityTF,1490, 50, 5000, 10); thresholdEquity = thresholdEquityTF; } else if (Name() == @ES#) .. etc. From: Matthias Sent: Wednesday, September 08, 2010 8:55 PM To: amibroker@yahoogroups.com Subject: [amibroker] Backtest multiple systems across multiple timeframes Hi, thanks to the contribution of Ed Pottasch, supported by Bruce, I was able to dig a little deeper into Amibroker coding. Everybody who is interested in applying multiple systems on the same underlying simultaneously should look here, great piece of work: http://finance.groups.yahoo.com/group/AmiBroker-at/message/5349 Thanks Ed, thanks Bruce. Unfortunately, I stumbled across a couple of questions when backtesting multiple systems across different timeframes, hope someone can help, sorry for the post being a bit lenghty. Both systems are traded on the same underlying, in order to make things easier for AB (Which is a bit strange) I used the same set of data, just renamed it. both systems operate on the same timeframe, say 15mins. Question 1: I use the same variable percentrisked for both systems. Wanted to optimize for percent risked (only!, this is NOT shown in the example below), so to say capital allocated to each system for the smoothest equity curve, AB keeps crashing... Can I use the same variable name in each sub-section or are there limits? should I dedicated percentrisked1 to system1 and percentrisked2 to system2 only? I am not a programmer, but for my understanding, both variables are local, so AB should not be crashing...? Is using Setoption in this context appropriate or would it result in wrong values? if(Name()==DAX_CFD_day1) { percentrisked=2.0; factor=Optimize(ATR-Factor,8.5,3,12,0.5); number=(percentrisked)/(ATR(14)*factor)*20; SetPositionSize(number, spsPercentOfEquity); SetOption(commissionmode,3); SetOption(Commissionamount,1.2); SetOption(AllowSameBarExit,True); SetOption(ActivateStopsImmediately,True); .systemlogic here } if(Name()==DAX_CFD_day) { percentrisked=Optimize(Bolli,0.6,0.5,1,0.1); sl=2;//Optimize(sl,2,2,2.5,0.5);//good:6 number=(percentrisked/(Ref(ATR(14),-1)*sl))*20; SetPositionSize(number, spsPercentOfEquity); SetOption(commissionmode,3); SetOption(Commissionamount,1.2); SetOption(AllowSameBarExit,True); SetOption(ActivateStopsImmediately,True); SetOption(FuturesMode,True); SetTradeDelays(1,1,1,1); Equity(1); ... systemlogic here } Question 2: Both systems above use 15min timeframe. Another system is using 1hr timeframe and is trading FX. I was not able to re-write the logic so that I could backtest the 3 systems with AA settings 15min timeframe. Any ideas? I do have about 8 systems, lowest timeframe is 5min, highest timeframe 4hrs. That would require a lot of re-writing... Am I alone with my I have too many-systems Problem or am I missing somehting? original logic in 1hr timeframe: percentrisked=0.007; sl=4.5; tp=2.5; number=((percentrisked)/(Ref(ATR(14),-0)*sl)); SetPositionSize(number,spsPercentOfEquity); SetOption(maxopenpositions,1); CCIperiod=Optimize(CCI,36,34,40,1); CCIthreshold=optimize(CCIthres,89,88,96,1); MAperiod=Optimize(maperiod,7,6,8,1); MA1= MA(C,MAperiod); MA2= MA(Ref(C,-2),MAperiod); CCIshort=CCI(CCIperiod)=ccithreshold; CCIbuy= CCI(CCIperiod)=-CCIthreshold; Buyok=Ref(CCIbuy,-1) AND Cross(MA1,MA2); Sellok=CCIshort; Shortok=Ref(CCIshort,-1) AND Cross(MA2,MA1); Coverok=CCIbuy; timestart=02; window=17 Check=timestart+window; timeok=TimeNum()=timestart AND TimeNum()=Check; Buy= Buyok AND timeok; Sell= Sellok; Short= Shortok AND timeok; Cover= Coverok; ApplyStop(stopTypeLoss,stopModePoint,sl*ATR(14)); //9 ApplyStop(stopTypeProfit,stopModePoint,tp*ATR(14)); //1.2 Equity(1); System2: percentrisked=0.007; sl=4.5; tp=2.5; SetOption(maxopenpositions,1); CCIperiod=Optimize(CCI,36,34,40,2); CCIthreshold=Optimize(CCIthres,97,88,96,2); MAperiod= Optimize(maperiod,7,7,9,1); TimeFrameSet(inHourly); MA1= MA(C,MAperiod); MA2= MA(Ref(C,-0),MAperiod); CCIhr= CCI(CCIperiod); ATR1= ATR(14); TimeFrameRestore(); number=((percentrisked)/(TimeFrameExpand(Ref(atr1,-0),inHourly)*sl)); SetPositionSize(number,spsPercentOfEquity);
Re: [amibroker] Re: Help with Code for MA Cross Over - Ribbon Indictor
Hello Ken, check this P = ParamField(Price field,-1); Periods = Param(Periods, 15, 2, 300, 1 ); Width = Param(Width%, 2, 0, 10, 0.05 ); Color = ParamColor(Color, colorCycle ); Style = ParamStyle(Style); CenterLine = MA( P, Periods ); Plot( (1 + Width * 0.01) * CenterLine, %EnvTop + _PARAM_VALUES(), Color, Style ); Plot( (1 - Width * 0.01) * CenterLine, %EnvBot + _PARAM_VALUES(), Color, Style ); CenterLine2 = MA(CenterLine,100); Plot( (1 + Width * 0.01) * CenterLine2, %EnvTop + _PARAM_VALUES(), 6, 32 ); Plot( (1 - Width * 0.01) * CenterLine2, %EnvBot + _PARAM_VALUES(), 6, 32 ); Thank you bye the way.. how do you intrepret your previous code ?? (MA Cross Over - Ribbon ) --- On Thu, 9/9/10, Ken H sfehe...@yahoo.com.au wrote: From: Ken H sfehe...@yahoo.com.au Subject: Re: [amibroker] Re: Help with Code for MA Cross Over - Ribbon Indictor To: amibroker@yahoogroups.com Date: Thursday, 9 September, 2010, 7:30 AM Thanks guys for the help to resolve my problem with the ribbon indicator code. It is greatly appreciated. If I can just ask for help one more time please. I am sure it is very simple to do but as much as I play around, I can't get the percent band code below to lock to a MA instead of the close. Can anyone suggest what I need to do? Many thanks again Ken _SECTION_BEGIN(Percent Bands); P = ParamField(MA1(Close,100,-1); Periods = Param(Periods, 15, 2, 300, 1 ); Width = Param(Width%, 2, 0, 10, 0.05 ); Color = ParamColor(Color, colorCycle ); Style = ParamStyle(Style); CenterLine = MA( P, Periods ); Plot( (1 + Width * 0.01) * CenterLine, %EnvTop + _PARAM_VALUES(), Color, Style ); Plot( (1 - Width * 0.01) * CenterLine, %EnvBot + _PARAM_VALUES(), Color, Style ); _SECTION_END();
[amibroker] Ribbon Indictors
Thanks Cas I will have play with your code and see how it works. A number of guys helped with a solution for a MA crossover, ribbon indicator. You can see their responses in previous emails. If you can't access them let me know and I will forward them on. A MA cross-over, ribbon indicator will allow me to hide the MA's on the price chart which makes everything easier to read. Basically, I am trying to find a way to look past the clutter so I can see the actual tree instead of the leaves. The more indicators I have, the more it plays with my mind and the harder it is to trade when looking at live data. Not being a spring chicken makes it harder for the grey matter to compute like it used to. It would be great if there was a ribbon indicator square we could tick in Parameters box for other indicators. That way we could place a number of ribbons at the bottom of the screen. Ribbons take up a small space but provide a quick, easy, readable at a glance, snap shot of what is happening. A ribbon indicator for the MACD (including the histogram) is another I would like to do if possible. Cheers Ken --- On Thu, 9/9/10, cas soni soni...@yahoo.co.in wrote: From: cas soni soni...@yahoo.co.in Subject: Re: [amibroker] Re: Help with Code for MA Cross Over - Ribbon Indictor To: amibroker@yahoogroups.com Received: Thursday, 9 September, 2010, 5:06 PM Hello Ken, check this P = ParamField(Price field,-1); Periods = Param(Periods, 15, 2, 300, 1 ); Width = Param(Width%, 2, 0, 10, 0.05 ); Color = ParamColor(Color, colorCycle ); Style = ParamStyle(Style); CenterLine = MA( P, Periods ); Plot( (1 + Width * 0.01) * CenterLine, %EnvTop + _PARAM_VALUES(), Color, Style ); Plot( (1 - Width * 0.01) * CenterLine, %EnvBot + _PARAM_VALUES(), Color, Style ); CenterLine2 = MA(CenterLine,100); Plot( (1 + Width * 0.01) * CenterLine2, %EnvTop + _PARAM_VALUES(), 6, 32 ); Plot( (1 - Width * 0.01) * CenterLine2, %EnvBot + _PARAM_VALUES(), 6, 32 ); Thank you bye the way.. how do you intrepret your previous code ?? (MA Cross Over - Ribbon ) --- On Thu, 9/9/10, Ken H sfehe...@yahoo.com.au wrote: From: Ken H sfehe...@yahoo.com.au Subject: Re: [amibroker] Re: Help with Code for MA Cross Over - Ribbon Indictor To: amibroker@yahoogroups.com Date: Thursday, 9 September, 2010, 7:30 AM Thanks guys for the help to resolve my problem with the ribbon indicator code. It is greatly appreciated. If I can just ask for help one more time please. I am sure it is very simple to do but as much as I play around, I can't get the percent band code below to lock to a MA instead of the close. Can anyone suggest what I need to do? Many thanks again Ken _SECTION_BEGIN(Percent Bands); P = ParamField(MA1(Close,100,-1); Periods = Param(Periods, 15, 2, 300, 1 ); Width = Param(Width%, 2, 0, 10, 0.05 ); Color = ParamColor(Color, colorCycle ); Style = ParamStyle(Style); CenterLine = MA( P, Periods ); Plot( (1 + Width * 0.01) * CenterLine, %EnvTop + _PARAM_VALUES(), Color, Style ); Plot( (1 - Width * 0.01) * CenterLine, %EnvBot + _PARAM_VALUES(), Color, Style ); _SECTION_END();
[amibroker] Re: AIRAP - fitness function
Thank you Paul for your contribution to this discussion. This example you have drawn is very valuable - to be honest until now I have been using discrete rates in all my calculations, which now seems to me as very tricky. Since - as far as I am concerned - AB calculates all performance metrics basing on arithmetic values, it would be advisable to prepere my own measures through CBT. --- In amibroker@yahoogroups.com, paultsho paul.t...@... wrote: There is also an article on your reference site on MaxDd http://www.intelligenthedgefundinvesting.com/ch06.html. In fact, there were other performance measures for you to consider. while I'll need sometime to look at the AIRAP more closely. I think it is important to point out that it is just as important to understand how different ways of applying your data to generate statistical fitness can affect your final answer just as much as choosing different fitness functions. For example, consider the follwoing Rate of return calculation: Period :Discrete Rate Continuously compounded 1 100% 0.693 =log(1+1) 2 -50% -0.693 =log(1-0.5) Avg 0.25 0 As we can see the arithmetic average, or the mean of the discrete rates of return, is plus 25% per period. Yet the investment has simply doubled and then halved to return to its original value at time 0. --- In amibroker@yahoogroups.com, tf28373 tomfid@ wrote: Hello everyone I have been working on the choose of fitness function following the Howard Bundy's advices in his Quantitative Trading Systems and come across M. Sharma's Alternative Investments Risk Adjusted Performance (AIRAP). The equation of it is as following: AIRAP = [ E pi*(1+TRi)(1-c) ] 1/(1-c) - 1, where TRi - ith period total fund return (in my opinon it can also be ith trade net return), c - risk aversion parameter (author suggests to set its value to c=4), i=1,...,N - number of periods (as for me it can be number of trades), pi - the probability of the ith period's total return (according to the author it can be replaced with 1/N). (For futher information please check this working paper: http://www.intelligenthedgefundinvesting.com/pubs/rb-ms01.pdf http://www.intelligenthedgefundinvesting.com/pubs/rb-ms01.pdf .) M. Sharma argues that this measure captures all higher moments, penalizes for higher volatility and leverage (downside risk is penalized more) and has all merits of Sharp ratio, though without its limitations and disadvantages. I have carried out some simulations on the artificial returns of different distributions and indeed it makes some difference. Nevertheless what I am suspicious about is the fact that it was the very first time I found this objective function even though it was created by Sharma about 5 years ago. As for me it can mean that AIRAP is in fact far from being effective or/and practical fitness measure at least for trader like us and nobody use it (maybe I am wrong...). Another issue that concerns me a bit is omission of MaxDrawDown in the equation, which - at least for me - is a very important risk measure. According to many experienced wise people writing on this forum (like ex Mr Bundy), an effective fitness function shouls take Max DD or some comparable risk measure into consideration in order to be really useful. What do you think about AIRAP? Should I proceed with utilizing this function? I am looking forward to your response. Thank you in advance. Tomasz
Re: [amibroker] Re: AIRAP - fitness function
Hi Scott, What about replacing MaxDD by AvgDD + 2 * StdevDD ? Regards, Ton. - Original Message - From: sdwcyberdude To: amibroker@yahoogroups.com Sent: Wednesday, September 08, 2010 4:34 PM Subject: [amibroker] Re: AIRAP - fitness function Tomasz, I also use and see value in the Max DD, however, I believe it is should only be a secondary measure. Think of a 10 year backtest. System X has 1 drawdown of 30% (max), and many small drawdown never exceeding 5%. System Y has 1 drawdown of 25% (max), and 10+ other drawdowns between 20 and 23%. Which system is more stable? I will invest risk capital in System X, which has the higher max drawdown, but much fewer drawdowns of depth. I would love to have a measure of drawdown that more directly and intuitively measures the depth and frequency of drawdowns per unit of time. Correlation of the equity curve also gets at that point. Regarding the Omega, I am relying on a friend who studied both the advanced math and models and uncover significant concerns with the Omega (I seem to recall in was bias issues around skewness and kurtosis, but I might be wrong), however it was unpublished work for hedge funds. He also developed a proprietary alternative. Sorry I can't be more helpful on that one. Kind Regards, Scott --- In amibroker@yahoogroups.com, tf28373 tom...@... wrote: Hi Scott Thanks for response. I agree that the Sortino ratio is a kind of solution to the typical Sharp ratio disadvantages (like penalization high moments, which for me is irrational). Nevertheless, there is no max dd taken into account, which confuses me a bit. However, I might be too devoted to this risk measure (max dd) - what do you think? Is mean and its variance better/sufficient values as far as the characteristics of equity line is considered? (This is what brain123 was supporting in many discussions.) One should be careful if it is built upon the Omega, which I believe introduces other problems. That is an interesting point - can you elaborate a bit on this one? In fact I was hoping to get this kind of information when starting this thread as - frankly speaking - I don't feel familiar with plain maths enough to analyse it... Looking forward to your response. Regards Tomasz --- In amibroker@yahoogroups.com, sdwcyberdude scwalker1986@ wrote: Tomasz, Thanks for raising this question (and for the good work you do). The Sortino Ratio is a well regarding improvement upon the Sharpe; I urge you to consider adding the Sortino to the base metric array. Is there a reason you passed on it earlier? The Sharpe ratio has a lot of problems and I was not familiar with the AIRAP. One should be careful if it is built upon the Omega, which I believe introduces other problems. Regards, Scott --- In amibroker@yahoogroups.com, tf28373 tomfid@ wrote: Hello everyone I have been working on the choose of fitness function following the Howard Bundy's advices in his Quantitative Trading Systems and come across M. Sharma's Alternative Investments Risk Adjusted Performance (AIRAP). The equation of it is as following: AIRAP = [ E pi*(1+TRi)(1-c) ] 1/(1-c) - 1, where TRi - ith period total fund return (in my opinon it can also be ith trade net return), c - risk aversion parameter (author suggests to set its value to c=4), i=1,...,N - number of periods (as for me it can be number of trades), pi - the probability of the ith period's total return (according to the author it can be replaced with 1/N). (For futher information please check this working paper: http://www.intelligenthedgefundinvesting.com/pubs/rb-ms01.pdf http://www.intelligenthedgefundinvesting.com/pubs/rb-ms01.pdf .) M. Sharma argues that this measure captures all higher moments, penalizes for higher volatility and leverage (downside risk is penalized more) and has all merits of Sharp ratio, though without its limitations and disadvantages. I have carried out some simulations on the artificial returns of different distributions and indeed it makes some difference. Nevertheless what I am suspicious about is the fact that it was the very first time I found this objective function even though it was created by Sharma about 5 years ago. As for me it can mean that AIRAP is in fact far from being effective or/and practical fitness measure at least for trader like us and nobody use it (maybe I am wrong...). Another issue that concerns me a bit is omission of MaxDrawDown in the equation, which - at least for me - is a very important risk measure. According to many experienced wise people writing on this forum (like ex Mr Bundy), an effective fitness function shouls take Max DD or some comparable risk
[amibroker] Re: Backtest multiple systems across multiple timeframes
Hi Matthias Some time ago I was working on the same problem. The solution I have come across is as following: 1) use #include command in the main code 2) inside the #include function do like this (of course all is just an example which will need adjustment to your needs): a) function(parameter1, parameter2,...,timeframe,...,parameterN) { switch (timeframe) { case 60: TimeFrameSet(inHourly); break; case 15: TimeFrameSet(in15Minute); break; case 5: TimeFrameSet(in5Minute); break; default: break; } //here comes the calculations of channels, threshold, averages, oscillator, etc, everything you need to obtain signals' conditions TimeFrameRestore();//AGAIN - it is just an example, by the way - sorry for illegable layout switch (timeframe) { case 60: channel1=TimeFrameExpand(chan1,inHourly,expandLast); channel2=TimeFrameExpand(chan2,inHourly,expandLast); oscillator1=TimeFrameExpand(osc1,inHourly,expandLast); break; case 15: //the logic of code the same as above... break; case 5: //as above break; default: channel1=chan; channel2=chan2; oscillator1=osc2; break; } //here comes the buy/sell/cover/short/stop conditions and position sizing, etc } Although using #include results in slower code exection, it is a kind of idea to handle different timeframes system backtest, so I hope that even if it does not help directly, it will at least inspire you to find your own solution. Regards Tomasz --- In amibroker@yahoogroups.com, Matthias meridian...@... wrote: Hi, thanks to the contribution of Ed Pottasch, supported by Bruce, I was able to dig a little deeper into Amibroker coding. Everybody who is interested in applying multiple systems on the same underlying simultaneously should look here, great piece of work: http://finance.groups.yahoo.com/group/AmiBroker-at/message/5349 Thanks Ed, thanks Bruce. Unfortunately, I stumbled across a couple of questions when backtesting multiple systems across different timeframes, hope someone can help, sorry for the post being a bit lenghty. Both systems are traded on the same underlying, in order to make things easier for AB (Which is a bit strange) I used the same set of data, just renamed it. both systems operate on the same timeframe, say 15mins. Question 1: I use the same variable percentrisked for both systems. Wanted to optimize for percent risked (only!, this is NOT shown in the example below), so to say capital allocated to each system for the smoothest equity curve, AB keeps crashing... Can I use the same variable name in each sub-section or are there limits? should I dedicated percentrisked1 to system1 and percentrisked2 to system2 only? I am not a programmer, but for my understanding, both variables are local, so AB should not be crashing...? Is using Setoption in this context appropriate or would it result in wrong values? if(Name()==DAX_CFD_day1) { percentrisked=2.0; factor=Optimize(ATR-Factor,8.5,3,12,0.5); number=(percentrisked)/(ATR(14)*factor)*20; SetPositionSize(number, spsPercentOfEquity); SetOption(commissionmode,3); SetOption(Commissionamount,1.2); SetOption(AllowSameBarExit,True); SetOption(ActivateStopsImmediately,True); .systemlogic here } if(Name()==DAX_CFD_day) { percentrisked=Optimize(Bolli,0.6,0.5,1,0.1); sl=2;//Optimize(sl,2,2,2.5,0.5);//good:6 number=(percentrisked/(Ref(ATR(14),-1)*sl))*20; SetPositionSize(number, spsPercentOfEquity); SetOption(commissionmode,3); SetOption(Commissionamount,1.2); SetOption(AllowSameBarExit,True); SetOption(ActivateStopsImmediately,True); SetOption(FuturesMode,True); SetTradeDelays(1,1,1,1); Equity(1); ... systemlogic here } Question 2: Both systems above use 15min timeframe. Another system is using 1hr timeframe and is trading FX. I was not able to re-write the logic so that I could backtest the 3 systems with AA settings 15min timeframe. Any ideas? I do have about 8 systems, lowest timeframe is 5min, highest timeframe 4hrs. That would require a lot of re-writing... Am I alone with my I have too many-systems Problem or am I missing somehting? original logic in 1hr timeframe: percentrisked=0.007; sl=4.5; tp=2.5; number=((percentrisked)/(Ref(ATR(14),-0)*sl)); SetPositionSize(number,spsPercentOfEquity); SetOption(maxopenpositions,1); CCIperiod=Optimize(CCI,36,34,40,1);
[amibroker] Re: Amibroker commissions in other currencies.
Hi, Thanks for the tip. I am actually using those specifications already, one needs to detail the margin, the value of a pip, etc in order to get appropriate order sizing and accurate results. That part works fine. The problem is that there is nothing there related to commisions or -more specifically- to the currency they are expressed in. The currency field in that information window works fine to translate everything to the account currency... everything but the commissions! So far the only idea that comes to mind would be to use as account currency the quote currency (for example JPY for backtesting USDJPY). That would produce accurate results, but it would be a little bit of a pain, and would require changing the account for every currency pair with a different quote currency. I am sure there has to be an easier way to do this. --- In amibroker@yahoogroups.com, reinsley reins...@... wrote: Hi, In Symbol | information | menu You can set contract specification for each future. I hope it helps you. Best regards
RE: [amibroker] Re: Backtest multiple systems across multiple timeframes
Thanks Tomasz, It s gonna take me some time to understand your idea. I'm not very satisfied with the overall way AB is handling this kind of topic.. anyways thanks for the assistance. could you explain a little more on how you put the #include statements? How many systems did you plug together? How many different timeframes? Did optimization for capital allocation work? (optimize percentrisked) Greets, Matthias From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of tf28373 Sent: Donnerstag, 9. September 2010 11:01 To: amibroker@yahoogroups.com Subject: [amibroker] Re: Backtest multiple systems across multiple timeframes Hi Matthias Some time ago I was working on the same problem. The solution I have come across is as following: 1) use #include command in the main code 2) inside the #include function do like this (of course all is just an example which will need adjustment to your needs): a) function(parameter1, parameter2,...,timeframe,...,parameterN) { switch (timeframe) { case 60: TimeFrameSet(inHourly); break; case 15: TimeFrameSet(in15Minute); break; case 5: TimeFrameSet(in5Minute); break; default: break; } //here comes the calculations of channels, threshold, averages, oscillator, etc, everything you need to obtain signals' conditions TimeFrameRestore();//AGAIN - it is just an example, by the way - sorry for illegable layout switch (timeframe) { case 60: channel1=TimeFrameExpand(chan1,inHourly,expandLast); channel2=TimeFrameExpand(chan2,inHourly,expandLast); oscillator1=TimeFrameExpand(osc1,inHourly,expandLast); break; case 15: //the logic of code the same as above... break; case 5: //as above break; default: channel1=chan; channel2=chan2; oscillator1=osc2; break; } //here comes the buy/sell/cover/short/stop conditions and position sizing, etc } Although using #include results in slower code exection, it is a kind of idea to handle different timeframes system backtest, so I hope that even if it does not help directly, it will at least inspire you to find your own solution. Regards Tomasz --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com , Matthias meridian...@... wrote: Hi, thanks to the contribution of Ed Pottasch, supported by Bruce, I was able to dig a little deeper into Amibroker coding. Everybody who is interested in applying multiple systems on the same underlying simultaneously should look here, great piece of work: http://finance.groups.yahoo.com/group/AmiBroker-at/message/5349 Thanks Ed, thanks Bruce. Unfortunately, I stumbled across a couple of questions when backtesting multiple systems across different timeframes, hope someone can help, sorry for the post being a bit lenghty. Both systems are traded on the same underlying, in order to make things easier for AB (Which is a bit strange) I used the same set of data, just renamed it. both systems operate on the same timeframe, say 15mins. Question 1: I use the same variable percentrisked for both systems. Wanted to optimize for percent risked (only!, this is NOT shown in the example below), so to say capital allocated to each system for the smoothest equity curve, AB keeps crashing... Can I use the same variable name in each sub-section or are there limits? should I dedicated percentrisked1 to system1 and percentrisked2 to system2 only? I am not a programmer, but for my understanding, both variables are local, so AB should not be crashing...? Is using Setoption in this context appropriate or would it result in wrong values? if(Name()==DAX_CFD_day1) { percentrisked=2.0; factor=Optimize(ATR-Factor,8.5,3,12,0.5); number=(percentrisked)/(ATR(14)*factor)*20; SetPositionSize(number, spsPercentOfEquity); SetOption(commissionmode,3); SetOption(Commissionamount,1.2); SetOption(AllowSameBarExit,True); SetOption(ActivateStopsImmediately,True); .systemlogic here } if(Name()==DAX_CFD_day) { percentrisked=Optimize(Bolli,0.6,0.5,1,0.1); sl=2;//Optimize(sl,2,2,2.5,0.5);//good:6 number=(percentrisked/(Ref(ATR(14),-1)*sl))*20; SetPositionSize(number, spsPercentOfEquity); SetOption(commissionmode,3); SetOption(Commissionamount,1.2); SetOption(AllowSameBarExit,True); SetOption(ActivateStopsImmediately,True); SetOption(FuturesMode,True); SetTradeDelays(1,1,1,1); Equity(1); ... systemlogic here } Question 2: Both systems above use 15min timeframe. Another system is using 1hr timeframe and is trading FX. I was not able to re-write the logic so that I could backtest the 3 systems with AA settings 15min timeframe. Any ideas? I do have about 8 systems, lowest timeframe is 5min, highest timeframe 4hrs. That would require a lot of re-writing... Am I alone with my I have too many-systems Problem or am I missing somehting? original logic in 1hr timeframe: percentrisked=0.007; sl=4.5; tp=2.5; number=((percentrisked)/(Ref(ATR(14),-0)*sl)); SetPositionSize(number,spsPercentOfEquity);
[amibroker] Re: Backtest multiple systems across multiple timeframes
Hi again I am aware that my previous email was far from being clear. Unfortunately I don't have much time to elaborate on the idea thouroughly. Anyway as far as your questions are concerned: 1) could you explain a little more on how you put the #include statements? I have created something like a summary formula file, where a) after settling some settings with SetOption, b) #include system1.afl #include system2.afl statements is put (system1.afl and system2.afl are the files with the code I delivered in the previous mail which should be by default created and saved in Include directory in AB) c) following code appears (example): if(Name()==EURUSD) { system1(param1,param2,...,timeframe,...,paramN); } if(Name()==EURUSD) { system2(param,etc,timeframe,etc); } d) that's it :) 2) How many systems did you plug together? How many different timeframes? Well, due to memory limitations I am only able to backtest like 5-8 different systems (no matter on which ticker or timeframe they are used). For example recently I check the performance of system1 (channel breakout - based) on EURUSD on 15M, the same system again on EURUSD, on 1M though, system2 (candlestick pattern - based) on EURUSD 15M, system2 on USDJPY 1H and system3 (violatility breakout - based) on USDJPY 5M simultanously. 3) Did optimization for capital allocation work? (optimize percentrisked) Very good point. However, I am far from answering, since I have only utilized presented formulas for backtesting systems that had already been optimized for position sizing separately. As my intension was just to check how they could work at the same time (compounded returns and...drawndowns, too), I don't know weather my idea works for optimization. I hope I helped a little bit. Regards Tomasz --- In amibroker@yahoogroups.com, Matthias K. meridian...@... wrote: Thanks Tomasz, It s gonna take me some time to understand your idea. I'm not very satisfied with the overall way AB is handling this kind of topic.. anyways thanks for the assistance. could you explain a little more on how you put the #include statements? How many systems did you plug together? How many different timeframes? Did optimization for capital allocation work? (optimize percentrisked) Greets, Matthias From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of tf28373 Sent: Donnerstag, 9. September 2010 11:01 To: amibroker@yahoogroups.com Subject: [amibroker] Re: Backtest multiple systems across multiple timeframes Hi Matthias Some time ago I was working on the same problem. The solution I have come across is as following: 1) use #include command in the main code 2) inside the #include function do like this (of course all is just an example which will need adjustment to your needs): a) function(parameter1, parameter2,...,timeframe,...,parameterN) { switch (timeframe) { case 60: TimeFrameSet(inHourly); break; case 15: TimeFrameSet(in15Minute); break; case 5: TimeFrameSet(in5Minute); break; default: break; } //here comes the calculations of channels, threshold, averages, oscillator, etc, everything you need to obtain signals' conditions TimeFrameRestore();//AGAIN - it is just an example, by the way - sorry for illegable layout switch (timeframe) { case 60: channel1=TimeFrameExpand(chan1,inHourly,expandLast); channel2=TimeFrameExpand(chan2,inHourly,expandLast); oscillator1=TimeFrameExpand(osc1,inHourly,expandLast); break; case 15: //the logic of code the same as above... break; case 5: //as above break; default: channel1=chan; channel2=chan2; oscillator1=osc2; break; } //here comes the buy/sell/cover/short/stop conditions and position sizing, etc } Although using #include results in slower code exection, it is a kind of idea to handle different timeframes system backtest, so I hope that even if it does not help directly, it will at least inspire you to find your own solution. Regards Tomasz --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com , Matthias meridian202@ wrote: Hi, thanks to the contribution of Ed Pottasch, supported by Bruce, I was able to dig a little deeper into Amibroker coding. Everybody who is interested in applying multiple systems on the same underlying simultaneously should look here, great piece of work: http://finance.groups.yahoo.com/group/AmiBroker-at/message/5349 Thanks Ed, thanks Bruce. Unfortunately, I stumbled across a couple of questions when backtesting multiple systems across different timeframes, hope someone can help, sorry for the post being a bit lenghty. Both systems are traded on the same underlying, in order to make things easier for AB (Which is a bit strange) I used the same set of data, just renamed it. both systems operate on the same timeframe, say 15mins.
Re: [amibroker] OT: installing OS again
You can also take a look at the link below http://www.macrium.com/reflectfree.asp On Sep 8, 2010, at 10:44 PM, Keith McCombs kmcco...@engineer.com wrote: Anthony -- I use: http://www.terabyteunlimited.com/image-for-windows.htm#IFWFEATURE If you click on Download, you can download a trial version. Sorry, I don't know what the limitations are on this version. I have, and use, the complete bundle including BootIt NG (for disk partitioning). $49. There is a learning curve (but not nearly as steep as AB). Another popular one is: http://www.acronis.com/homecomputing/products/trueimage/ I used a previous version of their Pro line, Backup Recovery. It also has a trial version. It was easier to use than I4W above. But I have used I4W for many, many years, so I just stick with it. Also, Terabyteunlimited doesn't charge for updates. Acronis does. -- Keith On 9/8/2010 07:31, Anthony Faragasso wrote: Thank you everyone... Keith, I am using windows Vista home premium...I can not run in Repair mode...I have exhausted all methods I can think of to repair the OS.. There are several / many Services that can not be started no matter what I have tried...I have not been able to update the OS through the windows automatic update service for sometime I do NOT have all installed program disks... Are there any free disk Imaging softwares that allow what you suggest ? Anthony - Original Message - From: Keith McCombs To: amibroker@yahoogroups.com Sent: Tuesday, September 07, 2010 11:52 PM Subject: Re: [amibroker] OT: installing OS again Before you attempt to do anything else, make a complete image of your hard drive. Make sure that your disk imaging software will allow you to recover individual folders and files as well as the entire image. Then see if you can run your OS installation software in 'Repair' mode. If you can, you may end up fixing what ever your problem is, without needing to reinstall any software. If that doesn't work, maybe you might have to reinstall the OS. Are you absolutely sure that the only solution to your problem is a complete re-install? Positive? Absolutely Positive? If so: Just because you have copies of all your installed programs does NOT mean that you can merely copy them onto the newly installed OS. You will have to re-install almost all of your programs. For this you need the Original installation programs, including protection keys, either on disks or saved elsewhere. Good luck, -- Keith BTW, I have been using PC's since the very first IBM ones. Probably owned a couple of dozen since then. The only time I have had to reinstall an OS was when I lost my first HD more than 25 years ago. Since then, I make drive images and/or use other work arounds. On 9/7/2010 02:36, reinsley wrote: Hi, IMO, before to format, save your My documents files ( it's another name under Vista, the file containing all your personnal documents), save your bookmarks ( IE or Firefox), save your Outlook settings (address book contacts, settings accounts) Emails as well if needed, but they are on ISP's server. Save the other application files such as AB, into c:\Program Files. Your formulas, your databases, etc. are there. Then format the disk, and start from scratch, install vista. Don't forget the drivers. Install all your applications. Printer and gadgets... Restore your My documents, and AB formulas, AB databases. You can do a todolist of the actions before to start. You update this document as and when you did it. Next install you update your technical notes, the order to proceed, the things forgotten. It's a good way to never miss a step. When everything is running fine for a while, you know what is worth to backup from time to time. :) Best regards Le 07/09/2010 00:44, Anthony Faragasso a écrit : I need to re-install windows Vista to correct several issues I am having... I purchased an external Hard drive...How do I move all programs and files to the external hard drive and then move them back to the computers internal hard drive after re-installing the operating system ? I do not think just backing up the internal hard drive will preserve all programs...some programs I do not have disks for... Help... thank you Anthony
[amibroker] Confused for Valuewhen Pls explain
SYNTAX valuewhen(EXPRESSION, ARRAY, n = 1) RETURNS ARRAY FUNCTION Returns the value of the ARRAY when the EXPRESSION was true on the n -th most recent occurrence. Note: this function allows also 0 and negative values for n - this enables referencing future EXAMPLE valuewhen( cross( close, ma(close,5) ) ,macd(), 1) So, What is the difference between n=1 and n=0 like below : valuewhen( cross( close, ma(close,5) ) ,macd(), 0) Anyone who really knows ?
[amibroker] how configure stop?
Hi, I need help to create a stop loss. This is my trade system // average 21 MME = EMA(Close,21); Media = MME - Ref(MME,-1); //average turn up, buy above high +0.01 BuyPrice = ValueWhen(Media 0 AND Ref(Media,-1) 0, High+0.01); OK //average turn donw, sell below low -0.01 SellPrice = ValueWhen(Media 0 AND Ref(Media,-1) 0, Low-0.01); OK //loss = ValueWhen(Media 0 AND Ref(Media,-1) 0, Low-0.01); Its not work, I would like to sell when average turn down(low - 0.01) or when price cross minimum of buyprice day. In fact, I need two point's sell. I don't know make it. // buy and sell Buy = Cross(High,BuyPrice) Media 0; OK Sell = Cross(SellPrice,Low) Media 0; //OR cross (loss, low) - its not work. Only the first condition work right. Buy = ExRem(Buy,Sell); Sell = ExRem(Sell,Buy); Thaks for help and sorry for my english.
[amibroker] Help: utter newbie gets bizarre results from backtesting
Hi, Sorry to make my first comment here a plea for help, but this has had me stumped for a couple of days now, and it's so weird I can only conclude I'm failing to do something really basic. I'm getting results from the backtester that don't make any sense to me at all. Quickest way to look: I've put a screenshot of the code and the problem in the Files section, in the Dan's Tales of Mystery folder. Bascially, I've made a really simple non-system to muck about with in the backtester, but it gives utterly bizarre results. Here's the code (running on 5-minute GBPUSD): - LastHigh = TimeFrameGetPrice( H, in5Minute, -1 ); Buy = High = LastHigh; BuyPrice = LastHigh; Sell = High LastHigh; SellPrice = Close; Plot ( Buy, Buy, colorGreen, styleDots); - Super simple, right? Buy on higer-highs, sell on the close after a lower high. Won't make money, but that's not the point. Anyway, if I run this on, say, the last 288 bars, everything seems fine. If I go much beyond that (see the screenshot for 1 September to 2 September) I get really anomalous results. Note the arrows on the one in the screenshot: there's an entry arrow where the rules don't give it an entry (the high for that bar is lower than the one previous). Note also that the Buy value, which is plotted along the bottom, is at zero. So why's it buying there? Then it enters at 5522, nowhere near the bar's range (lowest for the bar is 5585). It sells, again, when it shouldn't (the high is higher), and again at a price that bar doesn't reach (5473 vs the bar's low at 5581). Has anyone at all got any idea what's going wrong here? PS: I've messed with everything that seemed relevant, with TimeFrameSet and PriceBoundChecking and everything in the Settings windows...
Re: [amibroker] Re: Amibroker commissions in other currencies.
Use buyprice and sellprice : Spread = 0.0002; Buyprice = close + spread; Sellprice = close - spread; On Sep 9, 2010, at 11:15 AM, pipadder pipad...@yahoo.com wrote: Hi, Thanks for the tip. I am actually using those specifications already, one needs to detail the margin, the value of a pip, etc in order to get appropriate order sizing and accurate results. That part works fine. The problem is that there is nothing there related to commisions or -more specifically- to the currency they are expressed in. The currency field in that information window works fine to translate everything to the account currency... everything but the commissions! So far the only idea that comes to mind would be to use as account currency the quote currency (for example JPY for backtesting USDJPY). That would produce accurate results, but it would be a little bit of a pain, and would require changing the account for every currency pair with a different quote currency. I am sure there has to be an easier way to do this. --- In amibroker@yahoogroups.com, reinsley reins...@... wrote: Hi, In Symbol | information | menu You can set contract specification for each future. I hope it helps you. Best regards IMPORTANT PLEASE READ This group is for the discussion between users only. This is *NOT* technical support channel. TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at http://www.amibroker.com/feedback/ (submissions sent via other channels won't be considered) For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ Yahoo! Groups Links
[amibroker] AFl code required
Pls, any body can change it in Afl formula or made new codemy queries and any sollution coz once stock made made high or close according to my queries and from next day it will come again in result my query 1.Closed or made intraday high below 1-5% from RECENT previous rallie'S top 2. closed or made high above Recent previous ralliy's TOP 3 .Closed or made intraday high ABOVE 1-5% from previous rallies topThanksDharmendra Kalal --- On Sat, 9/4/10, Keith McCombs kmcco...@engineer.com wrote: From: Keith McCombs kmcco...@engineer.com Subject: Re: [amibroker] AFl required To: amibroker@yahoogroups.com Date: Saturday, September 4, 2010, 9:58 PM Silon -- You must be precise in how you define Recent and Top. For example: recent = 14; // this is maximum of 14 bars, including this one. You pick the number. top = HHV(Close, recent); // you might prefer High or Avg instead of Close top = ref(top, -1); // we don't want to include today's close, but 14 previous days percent = 0.01; // you pick number between -0.05 and 0.05 // -0.05=percent0 for your system 1 // percent = 0 for your system 2 // 0percent=0.05 for your system 3 system = High = top * (1 + percent); // or use Close instead of High Hope this helps. -- Keith 1. c On 9/4/2010 01:32, silon sama wrote: Dear All, Any Body Can Help Me in Coding of 3 AFLS-pls find attachment 1.Closed or made intraday high below 1-5% from RECENT previous rallie'S top 2. closed or made high above Recent previous ralliy's TOP 3 .Closed or made intraday high ABOVE 1-5% from previous rallies top Yours Thankfully Silon
[amibroker] Re: Amibroker commissions in other currencies.
Hi Aaron, and thanks for the suggestion. What you are basically saying is that I can add some artificial pips to the prices so that they take care of the commissions. Will that work if -for example- the sell price I set is not within the range of the bar in which I close? I thought Amibroker wouldn't allow me to do that, and that is why I dismissed the idea originally when I coded the system. The reason I ask is because the entry and exit prices of my systems are very precise and I am working with 1-minute bars, so I have to be careful not to alter them, it is price what determines when exactly I enter and exit a trade (I am already using buyprice, shortprice, sellprice and coverprice for this). If I alter -for example- sellprice as a way to include the commission and as a result the closing condition is not met in that bar because the modified sellprice falls out of the bar, I'd be getting different results. I can always evaluate the condition first with an unaltered price, but I might find a case in which the closing condition is met but the price at which I want to close (now altered to include the spread) does not fall into the range of that particular bar. --- In amibroker@yahoogroups.com, Aron Pipa aron.p...@... wrote: Use buyprice and sellprice : Spread = 0.0002; Buyprice = close + spread; Sellprice = close - spread; On Sep 9, 2010, at 11:15 AM, pipadder pipad...@... wrote:
[amibroker] Problem with empty value
Hi here is a my ema indicator. when I plot it I read an error message. If I scroll until the first bar initialized I see the indicator. Obviously I use my ema for exemple, I don't need it :) periodo = Param( periodo, 200); sma = MA(Close, periodo); Coeff = 2/(periodo +1); SetBarsRequired( sbrAll ) ; for( i = 0 ; i = periodo; i++ ) { MyEma[i] = sma[i]; } for( i = periodo+1 ; i BarCount; i++ ) { MyEma[i] = MyEma[i-1] + Coeff * (Close[i] - MyEma[i-1] ); } Plot( MyEma, _DEFAULT_NAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) );
[amibroker] Re: help with Thcsv plugin
bump can anyone help me please? --- In amibroker@yahoogroups.com, ims_spade ims_sp...@... wrote: I am trying to use ThCSV plugin to read fundamental data from a csv file in Amibroker vs 5.30 The plugin is available at: http://www.amibroker.com/bin/ThCSV.zip say I have a file named dse_funda.csv in the C:\program files\amibroker\csv\ folder the data are structured in the file like the following trading code, Face Value, DSE PE, Category,. ACI, 100, 20, A, BEXIMCO, 10, 34, B, GOOGLE, 50, 23, A,... .. .. now I want to print the value of the Face Value and DSE PE. on a chart for the default ticker/trading code. I have written my formula file as tcsSetPath(C:\\program files\\amibroker\\CSV\\); Graph0=C; Graph1=tcsGetArray(!dse_funda.csv, !Face Value); Graph2=tcsGetArray(!dse_funda.csv, !DSE PE); Graph2=tcsGetArray(!dse_funda.csv, !Category); However amibroker is able to find the file but not the field :( Can anyone please help me with this? with best regards
[amibroker] Req afl code for price,ema13, and bottom ribbon support,resistance,nothing
Hi afl experts I am looking for an afl code top show a chart with price(15minute),EMA13, and a bottom ribbon with three colorslike green for support,red for resistance and grey for neither. appreciate your help regards ford
[amibroker] Re: AIRAP - fitness function
Ton, Appears to be the right direction + promising; perhaps one of the forum math mavens will comment. Regards, Scott --- In amibroker@yahoogroups.com, Ton Sieverding ton.sieverd...@... wrote: Hi Scott, What about replacing MaxDD by AvgDD + 2 * StdevDD ? Regards, Ton. - Original Message - From: sdwcyberdude To: amibroker@yahoogroups.com Sent: Wednesday, September 08, 2010 4:34 PM Subject: [amibroker] Re: AIRAP - fitness function Tomasz, I also use and see value in the Max DD, however, I believe it is should only be a secondary measure. Think of a 10 year backtest. System X has 1 drawdown of 30% (max), and many small drawdown never exceeding 5%. System Y has 1 drawdown of 25% (max), and 10+ other drawdowns between 20 and 23%. Which system is more stable? I will invest risk capital in System X, which has the higher max drawdown, but much fewer drawdowns of depth. I would love to have a measure of drawdown that more directly and intuitively measures the depth and frequency of drawdowns per unit of time. Correlation of the equity curve also gets at that point. Regarding the Omega, I am relying on a friend who studied both the advanced math and models and uncover significant concerns with the Omega (I seem to recall in was bias issues around skewness and kurtosis, but I might be wrong), however it was unpublished work for hedge funds. He also developed a proprietary alternative. Sorry I can't be more helpful on that one. Kind Regards, Scott --- In amibroker@yahoogroups.com, tf28373 tomfid@ wrote: Hi Scott Thanks for response. I agree that the Sortino ratio is a kind of solution to the typical Sharp ratio disadvantages (like penalization high moments, which for me is irrational). Nevertheless, there is no max dd taken into account, which confuses me a bit. However, I might be too devoted to this risk measure (max dd) - what do you think? Is mean and its variance better/sufficient values as far as the characteristics of equity line is considered? (This is what brain123 was supporting in many discussions.) One should be careful if it is built upon the Omega, which I believe introduces other problems. That is an interesting point - can you elaborate a bit on this one? In fact I was hoping to get this kind of information when starting this thread as - frankly speaking - I don't feel familiar with plain maths enough to analyse it... Looking forward to your response. Regards Tomasz --- In amibroker@yahoogroups.com, sdwcyberdude scwalker1986@ wrote: Tomasz, Thanks for raising this question (and for the good work you do). The Sortino Ratio is a well regarding improvement upon the Sharpe; I urge you to consider adding the Sortino to the base metric array. Is there a reason you passed on it earlier? The Sharpe ratio has a lot of problems and I was not familiar with the AIRAP. One should be careful if it is built upon the Omega, which I believe introduces other problems. Regards, Scott --- In amibroker@yahoogroups.com, tf28373 tomfid@ wrote: Hello everyone I have been working on the choose of fitness function following the Howard Bundy's advices in his Quantitative Trading Systems and come across M. Sharma's Alternative Investments Risk Adjusted Performance (AIRAP). The equation of it is as following: AIRAP = [ E pi*(1+TRi)(1-c) ] 1/(1-c) - 1, where TRi - ith period total fund return (in my opinon it can also be ith trade net return), c - risk aversion parameter (author suggests to set its value to c=4), i=1,...,N - number of periods (as for me it can be number of trades), pi - the probability of the ith period's total return (according to the author it can be replaced with 1/N). (For futher information please check this working paper: http://www.intelligenthedgefundinvesting.com/pubs/rb-ms01.pdf http://www.intelligenthedgefundinvesting.com/pubs/rb-ms01.pdf .) M. Sharma argues that this measure captures all higher moments, penalizes for higher volatility and leverage (downside risk is penalized more) and has all merits of Sharp ratio, though without its limitations and disadvantages. I have carried out some simulations on the artificial returns of different distributions and indeed it makes some difference. Nevertheless what I am suspicious about is the fact that it was the very first time I found this objective function even though it was created by Sharma about 5 years ago. As for me it can mean that AIRAP is in fact far from being effective or/and practical fitness measure at least for trader like us and nobody use it (maybe I am wrong...). Another