[Komunitas AmiBroker] Re: [milis_omni] DOW Theory Summary In Visual Mind Mapping
Pak Andry, mungkin perlu ditambahkan penjelasan soal the average must confirm each other yang kalau aslinya adalah konfirmasi arah trend antara dua Index: Dow Industrial dan Dow Transportation. 2010/3/23 andry tjoe andryt...@gmail.com Untuk Visual Summary Dow Theory yang terlampir bersama ini Maaf Kalau gambar tidak bisa di buka Bisa di buka langsung di http://www.omniinvest.net/detail.php?id_chart=145 Salam AT www.omniinvest.net *Financial Capital Market Training*
[Komunitas AmiBroker] TLKM WAVE 24th UPDATED
http://besttechnicalanalysis.blogspot.com/ attachment: Chart.png
[Komunitas AmiBroker] Backtest
Dear all, Saya ingin melakukan backtest untuk semua saham, tujuannya untuk mendapatkan saham mana yang sesuai dengan formula tersebut. Tapi yang muncul kok tidak semua saham tapi hanya beberapa saham. Any idea ? Thank's sebelumnya rgds Harry
[amibroker] Formula to Calculate The Date from Today
Dear Friends, Could you help me to calculate what is the date of 77 days from today? Thanks Regards Sawios
[amibroker] Re: backtesting negative values(prices)
The scenario you describe sounds very questionable. There will never be negative prices in live trading. So, what's the point of wanting to backtest with negative values? Mike --- In amibroker@yahoogroups.com, Mi henni...@... wrote: Hi there I think I have to rephrase my question. I am trying to backtest some combination, which I generate in excel and import to AB. this combinations have occasionally negative values. these values are not taken into the backtest calculation. am I doing something wrong, or is it not possible to test with negative values. THX mfh --- In amibroker@yahoogroups.com, Mi hennigmf@ wrote: Hi all is there any possibility to backtest with negative prices? I tried and it worked only when the open price is positive. I was thinking about to shift the prices to the positive territory, but if there is an easy way to solve this issue I would prefer the easiest way. any comments are welcome mfh
[amibroker] Re: Dynamic Variable scope, and referencing elements of a Dynamic Variable array
Hi, I haven't actually tried any of this... But, if I recall correctly, variable scope is the scope at which the variable was first found. If you want a bunch of dynamic variables to be global, just initialize them at the top of the formula, before any function declarations. e.g. for (i = 0; i 10; i++) { VarSet(MyVar + i, 0); } function MyFunc() { ... } As for returning a dynamic variable; It really does not matter what you return from the function. The resulting value will be copied to the caller. Finally, to dereference a dynamic array, try fetch the array first then dereference second. e.g. MyArray = VarGet(someArray + n); Value = MyArray[i]; Mike --- In amibroker@yahoogroups.com, necroboy2 blair.an...@... wrote: Hi All,I've been looking through previous messages and the Amibroker user guide and have been unable to find an answer, so I hope one of you can help. When defining a Dynamic Variable is behaves like a normal variable in terms of scope. So if defined outside of a function its scope will be global, and if defined within a function its scope will be restricted to be within that function. To make a normal variable that is defined within a function global we can use the global keyword. Is there a way we can also do this for dynamic variables? I tried global VarSet(someVariable+i,n); but that just throws a syntax error. Now I could just not use functions, but that's just bad design. Is there a way I can define global dynamic variables from within a function, or perhaps return dynamic variables from a function? ---Now for the second question: How do I reference a specific element of an Array that is a Dynamic Variable? With a normal array I can just do this someArray[1]But with a Dynamic Variable that is an array I can't do this VarGet(someArray+n[1]) or this VarGet(someArray+n)[1] Cheers, Blair
[amibroker] Re: Formula to Calculate The Date from Today
Do you want 77 bars from now, or calendar days from now? If bars, just use Ref with a positive value. e.g. something like (untested) Ref(DateTime(), 77); http://www.amibroker.com/guide/afl/afl_view.php?id=122 http://www.amibroker.com/guide/afl/afl_view.php?id=196 If you want calendar days, you will have to figure something out using DaysSince1900. http://www.amibroker.com/guide/afl/afl_view.php?id=357 Mike --- In amibroker@yahoogroups.com, Kusnady saw...@... wrote: Dear Friends, Could you help me to calculate what is the date of 77 days from today? Thanks Regards Sawios
Re: [amibroker] Formula to Calculate The Date from Today
http://www.amibroker.org/userkb/2007/05/07/date-arithmetic/ herman Dear Friends, Could you help me to calculate what is the date of 77 days from today? Thanks Regards Sawios 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] Kangaroo Tail (Elder) AFL Code
Hi - does anyone have code they could share for finding 'Kangaroo tails' as per Elder's Book (Welcome to My Trading Room)
Re: [amibroker] Re: Programmatically set Current ticker?
I tried posting this twice already with the complete thread intact. But it would not post. Therefore, I have removed all of thread with exception of most recent post that I am replying to. Mike -- You've been a great help on this. First: |AB = CreateObject(Broker.Application);| |ADoc = AB.ActiveDocument;| |ADoc.Name = SPY;| does indeed make SPY the current ticker, assuming the previous ticker contains some data already. For the time being I will (manually) insure that the previous ticker does contain data, before starting the function (via paramtrigger()). When I first received your suggestion with the jscript example, I tried this: |AB = CreateObject(Broker.Application);| |AB.ActiveDocument||.Name = SPY;| which produces a Syntax error with the cursor just before .Name. I obviously do not understand the required structure, since the two snippets of code are equivalent in my mind. Though they are obviously not to the AFL checker. Second: In answer to your question: What would you expect the result to be if you had something like this: _TRACE(Close is: + Close); swap out symbol _TRACE(Close is: + Close); I would expect that the first _Trace would display the close of the previous symbol and the second one would display the new symbol. My expectation was wrong! After the swap, the first close was displayed 3 more times (within the same 10msec period, from 3 separate _Trace statements in the code). Then after 20msec, and two more 20msec periods, the new close was displayed for a total of 3 times. BTW, my intention is to use this ONLY when collecting symbols and prices from a file for trading the following day (using paramtrigger()). It is done only once a day. And is not done at all while trading. Thanks again. -- Keith On 3/16/2010 14:31, Mike wrote: Kieth, My example was for an external javascript (e.g. .js file). Trying to change the active symbol from within a running AFL is probably not a good idea (if at all possible) since you would effectively be executing AFL code that would be cutting your feet out from under yourself (i.e. running script over a symbol that changed the symbol before the script was finished running). What would you expect the result to be if you had something like this: _TRACE(Close is: + Close); swap out symbol _TRACE(Close is: + Close); I'm not sure exactly what scenario you are trying to capture. But, what I was suggesting was to run an external javascript to drive AmiBroker, not driving AmiBroker from within AmiBroker. However, to answer your question; Your problem is that you are mixing javascript and AFL incorrectly. You would just need to use AFL. e.g. AB = CreateObject(...); Doc = AB.ActiveDocument; Doc.Name = ... Mike
[amibroker] Custom Backtest and PositionSize = MarginDeposit = 1
Hi I'm trying to learn how to use AmiBroker's Custom Backtester as I believe the system I'm coding will need to use the low level interface. In order to understand the CBT fully I'm starting off simple, running trace's etc to see how it works. I have a very simple trading system which buys on the open and sells on the close. I'm trading index futures and for backtesting purposes I only want to trade a single contract. The problem I'm experiencing is that when I run a backtest on the code below in Automatic Analysis no trades appear in the trade list. However, if I comment out the line ... PositionSize = MarginDeposit = 1; // Trade size will be a single contract ... then I get a trade everyday although the position size is all wrong as it's not trading one futures contract. I've spent a couple of days trying different ways of trading just one contract but I'm not getting anywhere. Does anyone have any idea what I'm doing wrong? Any help would be appreciated. Thanks Craig // Money Management InitialEquity = 1; SetOption( InitialEquity, InitialEquity ); // Set initial equity SetOption( FuturesMode, True ); // Ensures trade accounting is done using margin deposit and point value SetOption( CommissionMode, 2 ); SetOption( CommissionAmount, 25); // Commission amount per trade (dollars) PositionSize = MarginDeposit = 1; // Trade size will be a single contract PointValue = 25; // Entry/Exit Signals BuyPrice = Open; SellPrice = Close; Buy = Open; Sell = Close; Short = 0; Cover = 0; SetCustomBacktestProc(); if( Status(action) == actionPortfolio ) { bo = GetBacktesterObject(); // Get backtester object bo.PreProcess(); // Do pre-processing for( i = 0; i BarCount; i++ ) // Loop through all bars { for( sig = bo.GetFirstSignal(i); sig; sig = bo.GetNextSignal(i) ) { // Loop through all signals at this bar if( sig.IsEntry() sig.IsLong() ) // Process long entries { bo.EnterTrade( i, sig.Symbol, True, sig.Price, sig.PosSize ); _TRACE(Entry signal = + i); } else { if( sig.IsExit() sig.IsLong() ) // Process long exits bo.ExitTrade( i, sig.Symbol, sig.Price ); _TRACE(Exit signal = + i); } } // End of for loop over signals at this bar bo.HandleStops(i); // Handle programmed stops at this bar bo.UpdateStats(i, 1); // Update MAE/MFE stats for bar bo.UpdateStats(i, 2); // Update stats at bar's end } // End of for loop over bars bo.PostProcess(); // Do post-processing }
Re: [amibroker] backtester: disregard open trades
I believe that you have to use CBT, Custom Back Tester, for this. Checkout example2 on page 902-903 of AmiBrokers Users Guide version 5.20. It is available in .pdf format on AB's download page. -- Keith On 3/22/2010 13:49, wml67 wrote: Friends, One more question. I remember seeing it asked before in this list, but can't find the thread... The built-in backtester metrics seem to take PnL of open trades into account. I guess this is handy for evaluating some strategies; in my case I feel that it distorts the results. Is there a way to tell backtester to ignore open trades when it calculates the metrics? Can't find one... Cheers!
[amibroker] Russell 2000
Does anyone have a current Russell 2000 component list? Or know where one is? Thank you MarkK
Re: [amibroker] Russell 2000
Russell publish their index constituents here: http://www.russell.com/Indexes/membership/default.asp However, you should note that the symbols used in that list represent the symbols dated June 2009. If there have been any symbol changes since then they won't be reflected. Our data service has an automatically-maintained watchlist which considers symbol changes, delistings etc. and maintains the watchlist for those events. Best regards, Richard Dale. Norgate Investor Services - Premium quality Stock, Futures and Foreign Exchange Data for markets in Australia, Asia, Canada, Europe, UK USA - www.premiumdata.net Original Message Subject: [amibroker] Russell 2000 From: MarkK mailya...@tampabay.rr.com To: amibroker@yahoogroups.com Date: Wed, 24 Mar 2010 07:13:36 -0400 */Does anyone have a current Russell 2000 component list? Or know where one is? Thank you/* */ /* */MarkK/* */ /*
[amibroker] Stepping thru loop
Hello, I wonder if I can step thru a loop where the step size is being computed WITHIN the loop. An example: I want the loop to check for every bar until high Ref (hhv(high,50),-1). From THAT bar on, the loop should check if low Ref (llv(low,50),-1) occured. Say, the first condition is true on bar 50, the loop should afterwards start to check for the second ccondition from bar 51 until that condition is fullfilled, say on bar 80. From THAT bar on, it again should check for the first condition etc. The thing is that I can´t tell the loop the step size in ADVANCE and it may differ over the whole data range, depending on WHEN the condition beign checked for is true. Any ideas on this? Thanks Markus
[amibroker] Re: backtester: disregard open trades
Keith, Thanks for answering. Actually, I AM using CBT and I know how to exclude open trades for custom metrics. My question is about the built-in metrics though, can their calc method be changed? Cheers! Sergei --- In amibroker@yahoogroups.com, Keith McCombs kmcco...@... wrote: I believe that you have to use CBT, Custom Back Tester, for this. Checkout example2 on page 902-903 of AmiBrokers Users Guide version 5.20. It is available in .pdf format on AB's download page. -- Keith On 3/22/2010 13:49, wml67 wrote: Friends, One more question. I remember seeing it asked before in this list, but can't find the thread... The built-in backtester metrics seem to take PnL of open trades into account. I guess this is handy for evaluating some strategies; in my case I feel that it distorts the results. Is there a way to tell backtester to ignore open trades when it calculates the metrics? Can't find one... Cheers!
[amibroker] Amibroker 5.30 and IB Controller 1.3.1 BETA
First: Congratulation to and thank you for the new release. Tomasz, I am just not sure if the new IB Controller is the same as the IB Controller 1.3.1 beta you were once sending me http://www.amibroker.com/at/1310/. I had the problem with trading of US Treasury Notes, Bonds etc. because of the digits. That's why you created the IB Controller 1.3.1. Is the new release the same? Thanks for developing a great application and your support. Regards, dubi
[amibroker] Re: Amibroker 5.30 and IB Controller 1.3.1 BETA
Please ignore my previous post. A reboot of AB and the 'chart' tab now shows all formulas correctly. --- In amibroker@yahoogroups.com, dubi1974 gonzale...@... wrote: First: Congratulation to and thank you for the new release. Tomasz, I am just not sure if the new IB Controller is the same as the IB Controller 1.3.1 beta you were once sending me http://www.amibroker.com/at/1310/. I had the problem with trading of US Treasury Notes, Bonds etc. because of the digits. That's why you created the IB Controller 1.3.1. Is the new release the same? Thanks for developing a great application and your support. Regards, dubi
[amibroker] Re: Amibroker 5.30 and IB Controller 1.3.1 BETA
Just upgraded to 5.30... FYI I don't see to have a tree hierarchy under 'charts' anymore... it's just blank. The formulas folder still exists in AB directory as it should. --- In amibroker@yahoogroups.com, dubi1974 gonzale...@... wrote: First: Congratulation to and thank you for the new release. Tomasz, I am just not sure if the new IB Controller is the same as the IB Controller 1.3.1 beta you were once sending me http://www.amibroker.com/at/1310/. I had the problem with trading of US Treasury Notes, Bonds etc. because of the digits. That's why you created the IB Controller 1.3.1. Is the new release the same? Thanks for developing a great application and your support. Regards, dubi
[amibroker] Re: Problems with IB plugin when backfilling data.
It's not IB that's the problem, its AB! I also have Ninja trader running on IB feed and ticks come in like a charm on ninja trader but not on AB. I recently asked support if they had changed the backfill policy on ib feed and they replied they had not done so. I have my DB set to ticks and the backfill period is greyed out. before i was able to get multiple days of backfill from ib but now i only get a few minutes of backfill... very disappointing indeed! ( this means they HAVE changed backfill policy )
[amibroker] Re: Formula to Calculate The Date from Today
Thanks Mike, 77 trading days ahead from Today...means around next three month excluding Friday, Saturday and Sunday Ref(DateTime(),77)...could be used for existing array, but the array from today till 77days ahead is still blank.do you think so? you can prove this by this instruction : // afl start a=DateTime(); Title = Date:+DateTimeToStr(a[BarCount-1]+77); // afl stop What I am looking for is almost the same as TIME DIFFERENCE IN 2 DATES. But I Need What is the date for 77 trading days from today? Do you have any idea? Regards sawios --- In amibroker@yahoogroups.com, Mike sfclimb...@... wrote: Do you want 77 bars from now, or calendar days from now? If bars, just use Ref with a positive value. e.g. something like (untested) Ref(DateTime(), 77); http://www.amibroker.com/guide/afl/afl_view.php?id=122 http://www.amibroker.com/guide/afl/afl_view.php?id=196 If you want calendar days, you will have to figure something out using DaysSince1900. http://www.amibroker.com/guide/afl/afl_view.php?id=357 Mike --- In amibroker@yahoogroups.com, Kusnady sawios@ wrote: Dear Friends, Could you help me to calculate what is the date of 77 days from today? Thanks Regards Sawios
[amibroker] Re: Formula to Calculate The Date from Today
Thanks Herman, I tried using TimeNum, but this is not a continuous time number, so I think DaysSince1900() might be the solution. Unfortunately DaysSince1990 is the array which stop until TODAY, so we need to add DaysSince1990 for 77 trading days ahead.Do you have formula/algoritm for DaySince1990? or Do you have any idea? Regards Sawios --- In amibroker@yahoogroups.com, Herman psy...@... wrote: http://www.amibroker.org/userkb/2007/05/07/date-arithmetic/ herman Dear Friends, Could you help me to calculate what is the date of 77 days from today? Thanks Regards Sawios 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
Re: [amibroker] Amibroker 5.30 and IB Controller 1.3.1 BETA
Hello, It was 1.3.0 with added config file, but now I have updated it to 1.3.1 - identical to what you had installed. Thanks for pointing this out. Best regards, Tomasz Janeczko amibroker.com On 2010-03-24 15:30, dubi1974 wrote: First: Congratulation to and thank you for the new release. Tomasz, I am just not sure if the new IB Controller is the same as the IB Controller 1.3.1 beta you were once sending me http://www.amibroker.com/at/1310/. I had the problem with trading of US Treasury Notes, Bonds etc. because of the digits. That's why you created the IB Controller 1.3.1. Is the new release the same? Thanks for developing a great application and your support. Regards, dubi 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] Re: Formula to Calculate The Date from Today
--- In amibroker@yahoogroups.com, Kusnady saw...@... wrote: 77 trading days ahead from Today...means around next three month excluding Friday, Saturday and Sunday A question: how can we know what trading days will occur in the future? It is not the same thing as a standard calendar since different regions can have different trading days. If we just go with 77 calendar days ahead excluding Friday, Saturday and Sunday then you should be able to get that using VBScript's DateAdd ( http://msdn.microsoft.com/en-us/library/cb7z8yf9%28VS.85%29.aspx ) and AFL Scripting Host. But then you'll still need to exclude Fri., Sat. and Sun. and determine the rounding rules. If you land on a Friday does that mean your date will be Thursday or Monday? And if you really want to exclude Holidays then you will have to store those dates somewhere and then exclude those dates as well. Tuzo
[amibroker] Re: backtesting negative values(prices)
Hi Mike thx for reply. I am trying to backtest combinations e.g buying one stock selling another. but i am not sure which stock out of a sample to buy and which to sell, so i created the different combinations, but unfortunately some have negative values. I was thinking about to do it the other way e.g. spread = a-b opposite spread_o = b-a if spread is negative than spread_o is positive, so instead of selling spread then i should buy spread_o. but this is still complicate because i generate this spread out of a matrix. I would appreciate to do the test with negative values to find out the best combination. if someone knows how to do... regards mfh --- In amibroker@yahoogroups.com, Mike sfclimb...@... wrote: The scenario you describe sounds very questionable. There will never be negative prices in live trading. So, what's the point of wanting to backtest with negative values? Mike --- In amibroker@yahoogroups.com, Mi hennigmf@ wrote: Hi there I think I have to rephrase my question. I am trying to backtest some combination, which I generate in excel and import to AB. this combinations have occasionally negative values. these values are not taken into the backtest calculation. am I doing something wrong, or is it not possible to test with negative values. THX mfh --- In amibroker@yahoogroups.com, Mi hennigmf@ wrote: Hi all is there any possibility to backtest with negative prices? I tried and it worked only when the open price is positive. I was thinking about to shift the prices to the positive territory, but if there is an easy way to solve this issue I would prefer the easiest way. any comments are welcome mfh
RE: [amibroker] Re: Problems with IB plugin when backfilling data.
Hello, Everything works ok, change data base to 1 minute and down load up to 180 days, if grayed out then you can down load tick data only, but very limited amount. Regards, JG -Original Message- From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of labratno9 Sent: Wednesday, March 24, 2010 9:18 AM To: amibroker@yahoogroups.com Subject: [amibroker] Re: Problems with IB plugin when backfilling data. It's not IB that's the problem, its AB! I also have Ninja trader running on IB feed and ticks come in like a charm on ninja trader but not on AB. I recently asked support if they had changed the backfill policy on ib feed and they replied they had not done so. I have my DB set to ticks and the backfill period is greyed out. before i was able to get multiple days of backfill from ib but now i only get a few minutes of backfill... very disappointing indeed! ( this means they HAVE changed backfill policy ) 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
Re: [amibroker] Re: Problems with IB plugin when backfilling data.
Hello, Precisely. If you actually read API docs: http://www.interactivebrokers.com/en/software/apiReleaseNotes/api_84.php?ib_entity=uk#84_intraday you would see what are the limits of backfill and that they are set by IB, not AmiBroker. See the table in the document pointed out above. 2000 seconds is maximum backfill length when timeslice duration is 1 second (finest available @ IB). Therefore you can not get more than 2000 seconds in one request when your database is set to Base time interval of Tick. The only way to get more than 1 day of backfill data is to use base time interval of 1-minute. Best regards, Tomasz Janeczko amibroker.com On 2010-03-24 19:32, Jerry Gress wrote: Hello, Everything works ok, change data base to 1 minute and down load up to 180 days, if grayed out then you can down load tick data only, but very limited amount. Regards, JG -Original Message- From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of labratno9 Sent: Wednesday, March 24, 2010 9:18 AM To: amibroker@yahoogroups.com Subject: [amibroker] Re: Problems with IB plugin when backfilling data. It's not IB that's the problem, its AB! I also have Ninja trader running on IB feed and ticks come in like a charm on ninja trader but not on AB. I recently asked support if they had changed the backfill policy on ib feed and they replied they had not done so. I have my DB set to ticks and the backfill period is greyed out. before i was able to get multiple days of backfill from ib but now i only get a few minutes of backfill... very disappointing indeed! ( this means they HAVE changed backfill policy ) 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 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] ES or NQ symbol Futures one minute
Using W7 Ultimate on IB. P R O F E S S I O N A LE D I T I O N (Version 5.29.6, Build date: Dec 24 2009) When I went to W7 from beta W7 lost the one minute symbol for one minute using IB simulated for 2010. Tried all of the following in Real Time. ESQ10-GLOBEX-FUT ESU10-GLOBEX-FUT ESZ10-GLOBEX-FUT ESM10-GLOBEX-FUT Cant fiquire what is wrong. YM works fine for June 2010 chart or Real Time Quote Ray
[amibroker] performance measure: percentage load factor
Tomasz How should percentage load factor be interpreted? For example when I see 180%, what is basis of comparison? TIA
Re: [amibroker] performance measure: percentage load factor
Hello, It is described in the User's Guide Performance tuning tips chapter http://www.amibroker.com/guide/x_performance.html Best regards, Tomasz Janeczko amibroker.com On 2010-03-24 20:14, ta wrote: Tomasz How should percentage load factor be interpreted? For example when I see 180%, what is basis of comparison? TIA
RE: [amibroker] ES or NQ symbol Futures one minute
Hello, ESM0-GLOBEX_FUT That a zero. Regards, JG -Original Message- From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of me_rayme Sent: Wednesday, March 24, 2010 11:49 AM To: amibroker@yahoogroups.com Subject: [amibroker] ES or NQ symbol Futures one minute Using W7 Ultimate on IB. P R O F E S S I O N A LE D I T I O N (Version 5.29.6, Build date: Dec 24 2009) When I went to W7 from beta W7 lost the one minute symbol for one minute using IB simulated for 2010. Tried all of the following in Real Time. ESQ10-GLOBEX-FUT ESU10-GLOBEX-FUT ESZ10-GLOBEX-FUT ESM10-GLOBEX-FUT Cant fiquire what is wrong. YM works fine for June 2010 chart or Real Time Quote Ray 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
RE: [amibroker] performance measure: percentage load factor
Thanks. I didn't know you had updated the help files and online user guide. When should we expect the x64 version of 5.3? couple of weeks after release of 5.3? From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of Tomasz Janeczko Sent: Wednesday, March 24, 2010 12:44 PM To: amibroker@yahoogroups.com Subject: Re: [amibroker] performance measure: percentage load factor Hello, It is described in the User's Guide Performance tuning tips chapter http://www.amibroker.com/guide/x_performance.html Best regards, Tomasz Janeczko amibroker.com On 2010-03-24 20:14, ta wrote: Tomasz How should percentage load factor be interpreted? For example when I see 180%, what is basis of comparison? TIA
[amibroker] upgrade installation Ver.530 is not exist?
hi i just try to install Ami 530 on the same folder that 529 already exist, and i would like to chose upgrade installation but is NOT exist on select setup type window, the only that i can see is full installation. Shall i make a full installation Tomasz or not? i am using win xp pro sp3 thank you Panos
[amibroker] Re: Stepping thru loop
What makes you think that you are changing the step size? From what I see, you're still advancing a single bar at a time. bigHigh = high Ref (hhv(high,50),-1); smallLow = low Ref (llv(low,50),-1); lookingForHigh = true; for (bar = 0; bar BarCount; bar++) { if (lookingForHigh) { if (bigHigh[bar]) { lookingForHigh = false; // now looking for low } } else { if (smallLow[bar]) { lookingForHigh = true; } } } Mike --- In amibroker@yahoogroups.com, Markus Witzler funny...@... wrote: Hello, I wonder if I can step thru a loop where the step size is being computed WITHIN the loop. An example: I want the loop to check for every bar until high Ref (hhv(high,50),-1). From THAT bar on, the loop should check if low Ref (llv(low,50),-1) occured. Say, the first condition is true on bar 50, the loop should afterwards start to check for the second ccondition from bar 51 until that condition is fullfilled, say on bar 80. From THAT bar on, it again should check for the first condition etc. The thing is that I can´t tell the loop the step size in ADVANCE and it may differ over the whole data range, depending on WHEN the condition beign checked for is true. Any ideas on this? Thanks Markus
Re: [amibroker] upgrade installation Ver.530 is not exist?
Hello, “Upgrade installation” is available as an option in the setup only if full setup of any earlier *official* version was run on the same machine before. It does not matter if *files* are there. What counts is if you run FULL SETUP of earlier version before. This is to prevent incorrect installations (people were just copying files which was wrong). Differences between “Upgrade installation” and “Full installation” - Full setup installs sample DJI database under “Data” folder, Upgrade does not do that. - Full setup resets Custom Tools menu, Upgrade does not do that. - Full setup overwrites default .format files (ASCII importer definitions), Upgrade only installs them when old ones are not found - Full setup is required for first time Vista / Windows 7 install Other than that both modes are the same. Best regards, Tomasz Janeczko amibroker.com On 2010-03-24 20:56, blaxaki wrote: hi i just try to install Ami 530 on the same folder that 529 already exist, and i would like to chose upgrade installation but is NOT exist on select setup type window, the only that i can see is full installation. Shall i make a full installation Tomasz or not? i am using win xp pro sp3 thank you Panos 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 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) * To change settings via email: amibroker-dig...@yahoogroups.com amibroker-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: amibroker-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[amibroker] Re: Formula to Calculate The Date from Today
Sorry, I just assumed that you meant 77 days from the current bar, which was a bar in the past. No, I don't know of a way to get bars in the future that don't exist yet. Mike --- In amibroker@yahoogroups.com, Kusnady saw...@... wrote: Thanks Mike, 77 trading days ahead from Today...means around next three month excluding Friday, Saturday and Sunday Ref(DateTime(),77)...could be used for existing array, but the array from today till 77days ahead is still blank.do you think so? you can prove this by this instruction : // afl start a=DateTime(); Title = Date:+DateTimeToStr(a[BarCount-1]+77); // afl stop What I am looking for is almost the same as TIME DIFFERENCE IN 2 DATES. But I Need What is the date for 77 trading days from today? Do you have any idea? Regards sawios --- In amibroker@yahoogroups.com, Mike sfclimbers@ wrote: Do you want 77 bars from now, or calendar days from now? If bars, just use Ref with a positive value. e.g. something like (untested) Ref(DateTime(), 77); http://www.amibroker.com/guide/afl/afl_view.php?id=122 http://www.amibroker.com/guide/afl/afl_view.php?id=196 If you want calendar days, you will have to figure something out using DaysSince1900. http://www.amibroker.com/guide/afl/afl_view.php?id=357 Mike --- In amibroker@yahoogroups.com, Kusnady sawios@ wrote: Dear Friends, Could you help me to calculate what is the date of 77 days from today? Thanks Regards Sawios
[amibroker] Re: upgrade installation Ver.530 is not exist?
You are all right. Correct that is true I just open Add remove programs and amibroker is not there , so i am sorry, I was thinking that running full earlier *official* version setup thank you Panos --- In amibroker@yahoogroups.com, Tomasz Janeczko gro...@... wrote: Hello, Upgrade installation is available as an option in the setup only if full setup of any earlier *official* version was run on the same machine before. It does not matter if *files* are there. What counts is if you run FULL SETUP of earlier version before. This is to prevent incorrect installations (people were just copying files which was wrong). Differences between Upgrade installation and Full installation - Full setup installs sample DJI database under Data folder, Upgrade does not do that. - Full setup resets Custom Tools menu, Upgrade does not do that. - Full setup overwrites default .format files (ASCII importer definitions), Upgrade only installs them when old ones are not found - Full setup is required for first time Vista / Windows 7 install Other than that both modes are the same. Best regards, Tomasz Janeczko amibroker.com On 2010-03-24 20:56, blaxaki wrote: hi i just try to install Ami 530 on the same folder that 529 already exist, and i would like to chose upgrade installation but is NOT exist on select setup type window, the only that i can see is full installation. Shall i make a full installation Tomasz or not? i am using win xp pro sp3 thank you Panos 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] Intraday Settings different Instruments
Is it possible to define different intraday settings (e. g. trading hours) for say, stocks and futures with IB, within one single database? Thanks in advance!
[amibroker] Re: Stepping thru loop
Nice code Mike, to take this a step farther, is it posible to attach a label to each HHV and LLV such as HH1, HH2, HH3, LL1, LL2, and LL3 without referencing future quotes? --- In amibroker@yahoogroups.com, Mike sfclimb...@... wrote: What makes you think that you are changing the step size? From what I see, you're still advancing a single bar at a time. bigHigh = high Ref (hhv(high,50),-1); smallLow = low Ref (llv(low,50),-1); lookingForHigh = true; for (bar = 0; bar BarCount; bar++) { if (lookingForHigh) { if (bigHigh[bar]) { lookingForHigh = false; // now looking for low } } else { if (smallLow[bar]) { lookingForHigh = true; } } } Mike --- In amibroker@yahoogroups.com, Markus Witzler funnybiz@ wrote: Hello, I wonder if I can step thru a loop where the step size is being computed WITHIN the loop. An example: I want the loop to check for every bar until high Ref (hhv(high,50),-1). From THAT bar on, the loop should check if low Ref (llv(low,50),-1) occured. Say, the first condition is true on bar 50, the loop should afterwards start to check for the second ccondition from bar 51 until that condition is fullfilled, say on bar 80. From THAT bar on, it again should check for the first condition etc. The thing is that I can´t tell the loop the step size in ADVANCE and it may differ over the whole data range, depending on WHEN the condition beign checked for is true. Any ideas on this? Thanks Markus
[amibroker] Re: Custom Backtest and PositionSize = MarginDeposit = 1
Perhaps it's a problem with my AmiBroker setup. Can anyone else replicate my problem? Thanks Craig --- In amibroker@yahoogroups.com, sancra01 sancr...@... wrote: Hi I'm trying to learn how to use AmiBroker's Custom Backtester as I believe the system I'm coding will need to use the low level interface. In order to understand the CBT fully I'm starting off simple, running trace's etc to see how it works. I have a very simple trading system which buys on the open and sells on the close. I'm trading index futures and for backtesting purposes I only want to trade a single contract. The problem I'm experiencing is that when I run a backtest on the code below in Automatic Analysis no trades appear in the trade list. However, if I comment out the line ... PositionSize = MarginDeposit = 1; // Trade size will be a single contract ... then I get a trade everyday although the position size is all wrong as it's not trading one futures contract. I've spent a couple of days trying different ways of trading just one contract but I'm not getting anywhere. Does anyone have any idea what I'm doing wrong? Any help would be appreciated. Thanks Craig // Money Management InitialEquity = 1; SetOption( InitialEquity, InitialEquity ); // Set initial equity SetOption( FuturesMode, True ); // Ensures trade accounting is done using margin deposit and point value SetOption( CommissionMode, 2 ); SetOption( CommissionAmount, 25); // Commission amount per trade (dollars) PositionSize = MarginDeposit = 1; // Trade size will be a single contract PointValue = 25; // Entry/Exit Signals BuyPrice = Open; SellPrice = Close; Buy = Open; Sell = Close; Short = 0; Cover = 0; SetCustomBacktestProc(); if( Status(action) == actionPortfolio ) { bo = GetBacktesterObject(); // Get backtester object bo.PreProcess(); // Do pre-processing for( i = 0; i BarCount; i++ ) // Loop through all bars { for( sig = bo.GetFirstSignal(i); sig; sig = bo.GetNextSignal(i) ) { // Loop through all signals at this bar if( sig.IsEntry() sig.IsLong() ) // Process long entries { bo.EnterTrade( i, sig.Symbol, True, sig.Price, sig.PosSize ); _TRACE(Entry signal = + i); } else { if( sig.IsExit() sig.IsLong() ) // Process long exits bo.ExitTrade( i, sig.Symbol, sig.Price ); _TRACE(Exit signal = + i); } } // End of for loop over signals at this bar bo.HandleStops(i); // Handle programmed stops at this bar bo.UpdateStats(i, 1); // Update MAE/MFE stats for bar bo.UpdateStats(i, 2); // Update stats at bar's end } // End of for loop over bars bo.PostProcess(); // Do post-processing }
[amibroker] Re: Adjusting intraday data for summer time changes
I bring this topic up again, as I do have this issues with Europe and US right now. At the moment I use the TWS IB data. Normaly the time shift between CET und NY Time is 6 hours. Right now it is 5 hours. So this confuses the database. The US markets opens at 14:30 and closes at 21:15. And if I want to filter for day session only I see my US data between 15:30 and 22:15. Is there no better way to handle this time problem in Amibroker when US and Europe are changing to summer/winter time on different weekends? Any solutions? Kind regards, dubi --- In amibroker@yahoogroups.com, Graham gkavan...@... wrote: I have created a small routine to make the appropriate changes for the upcoming summer time changes in US and Australian eastern states (no time changes where I live, but the ASX market is in east states). I believe the US and Aust change on the same date again so the changes only need to be done once. I use quotetracker for intraday data and this arrives as US EST (ESST) so in my summer the time shift is +16 hours and in winter +14 hours. Previously I used to export the data to excel and change the times there which was laborious and boring. Now the improvements in AB make this simple and easy. Btw if you do not make the mods to the historical intraday data the times will not be consistent throughout your data. Here is the instructions and code, hope this helps someone /* CHANGING ALL DATA FOR SUMMER TIME CHANGES Datafeed through QT is in US EST which changes with the seasons daylight saving. About the same time (if lucky on same weekend) Australian eastern states change summer time (in reverse). So we have in Aust summer time shift +16 hours AND in winter +14 hours To change the times for summer timezone changes US Australian for the historical saved data in Amibroker I use the following:- For Export: Databse Settings - Intraday Settings - In March - change the time shift to +2 hrs to adjust for winter time In November - change the time shift to -2 hrs to adjust for summer time (Nov) Export intraday and EOD data to TXT files One file for each stock In the first line insert the directory you want to save them to, make sure the directory exists Select your charts to export with the Apply to filter in AA window Select the timeframe period you want to save as using the AA Settings Press Scan button The data is now saved to txt files with US times adjusted for the next timezone season. To Create the new database for new season Remove all data from the existing database (or create new one) Make the time shift in Database Settings - Intraday Settings to 0 (zero) Import the adjusted data with the import wizard. Now ready to rock and roll Oh sometimes the US and Aust do not change summer time on same weekend and this needs to be done twice with 1 hour adjustment each time :( by Graham Kavanagh 05 Mar 2004 */ fh = fopen( c:\\SaveData\\+Name()+.txt, w); if( fh ) { fputs( Ticker,Date,Time,Open,High,Low,Close,Volume \n, fh ); y = Year(); m = Month(); d = Day(); r = Hour(); e = Minute(); n = Second(); for( i = 0; i BarCount; i++ ) { fputs( Name() + , , fh ); ds = StrFormat(%02.0f-%02.0f-%02.0f,, y[ i ], m[ i ], d[ i ] ); fputs( ds, fh ); ts = StrFormat(%02.0f:%02.0f:%02.0f,, r[ i ],e[ i ],n[ i ] ); fputs( ts, fh ); qs = StrFormat(%.4f,%.4f,%.4f,%.4f,%.0f\n, O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] ); fputs( qs, fh ); } fclose( fh ); } Buy = 0; Cheers, Graham http://e-wire.net.au/~eb_kavan/
[amibroker] optimization
hey, Is it possible to optimize the timenum() function? Thnks, J __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com.
[amibroker] Re: Formula to Calculate The Date from Today
your question can be well answer in this ads http://finance.groups.yahoo.com/group/amibroker/message/148126 and thanks to Herman Unfortunately the above using DateNum which is not continous numberso we could not add 77days to DateNum The DaySince1990 is good because of it is continuous, but we can not solved 100% in logics below: 1. Today Date is changed to DAYSSINCE1990 formula, and get Var_A 2. Var_B = Var_A + 77; 3. Changed Var_B to DATEON77DAY; How to do the Step 3? Regards --- In amibroker@yahoogroups.com, tuzo_wilson j.tuzo.wil...@... wrote: --- In amibroker@yahoogroups.com, Kusnady sawios@ wrote: 77 trading days ahead from Today...means around next three month excluding Friday, Saturday and Sunday A question: how can we know what trading days will occur in the future? It is not the same thing as a standard calendar since different regions can have different trading days. If we just go with 77 calendar days ahead excluding Friday, Saturday and Sunday then you should be able to get that using VBScript's DateAdd ( http://msdn.microsoft.com/en-us/library/cb7z8yf9%28VS.85%29.aspx ) and AFL Scripting Host. But then you'll still need to exclude Fri., Sat. and Sun. and determine the rounding rules. If you land on a Friday does that mean your date will be Thursday or Monday? And if you really want to exclude Holidays then you will have to store those dates somewhere and then exclude those dates as well. Tuzo
[amibroker] Re: Formula to Calculate The Date from Today
Mike, do you know how to convert from DAYSINCE1990 to DATE? Sawios --- In amibroker@yahoogroups.com, Mike sfclimb...@... wrote: Sorry, I just assumed that you meant 77 days from the current bar, which was a bar in the past. No, I don't know of a way to get bars in the future that don't exist yet. Mike --- In amibroker@yahoogroups.com, Kusnady sawios@ wrote: Thanks Mike, 77 trading days ahead from Today...means around next three month excluding Friday, Saturday and Sunday Ref(DateTime(),77)...could be used for existing array, but the array from today till 77days ahead is still blank.do you think so? you can prove this by this instruction : // afl start a=DateTime(); Title = Date:+DateTimeToStr(a[BarCount-1]+77); // afl stop What I am looking for is almost the same as TIME DIFFERENCE IN 2 DATES. But I Need What is the date for 77 trading days from today? Do you have any idea? Regards sawios --- In amibroker@yahoogroups.com, Mike sfclimbers@ wrote: Do you want 77 bars from now, or calendar days from now? If bars, just use Ref with a positive value. e.g. something like (untested) Ref(DateTime(), 77); http://www.amibroker.com/guide/afl/afl_view.php?id=122 http://www.amibroker.com/guide/afl/afl_view.php?id=196 If you want calendar days, you will have to figure something out using DaysSince1900. http://www.amibroker.com/guide/afl/afl_view.php?id=357 Mike --- In amibroker@yahoogroups.com, Kusnady sawios@ wrote: Dear Friends, Could you help me to calculate what is the date of 77 days from today? Thanks Regards Sawios
Re: [amibroker] Re: Adjusting intraday data for summer time changes
dubi -- There is a free utility available at: http://www.karenware.com/powertools/ptzone.asp That ought to do the trick. -- Keith On 3/24/2010 18:48, dubi1974 wrote: I bring this topic up again, as I do have this issues with Europe and US right now. At the moment I use the TWS IB data. Normaly the time shift between CET und NY Time is 6 hours. Right now it is 5 hours. So this confuses the database. The US markets opens at 14:30 and closes at 21:15. And if I want to filter for day session only I see my US data between 15:30 and 22:15. Is there no better way to handle this time problem in Amibroker when US and Europe are changing to summer/winter time on different weekends? Any solutions? Kind regards, dubi --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, Graham gkavan...@... wrote: I have created a small routine to make the appropriate changes for the upcoming summer time changes in US and Australian eastern states (no time changes where I live, but the ASX market is in east states). I believe the US and Aust change on the same date again so the changes only need to be done once. I use quotetracker for intraday data and this arrives as US EST (ESST) so in my summer the time shift is +16 hours and in winter +14 hours. Previously I used to export the data to excel and change the times there which was laborious and boring. Now the improvements in AB make this simple and easy. Btw if you do not make the mods to the historical intraday data the times will not be consistent throughout your data. Here is the instructions and code, hope this helps someone /* CHANGING ALL DATA FOR SUMMER TIME CHANGES Datafeed through QT is in US EST which changes with the seasons daylight saving. About the same time (if lucky on same weekend) Australian eastern states change summer time (in reverse). So we have in Aust summer time shift +16 hours AND in winter +14 hours To change the times for summer timezone changes US Australian for the historical saved data in Amibroker I use the following:- For Export: Databse Settings - Intraday Settings - In March - change the time shift to +2 hrs to adjust for winter time In November - change the time shift to -2 hrs to adjust for summer time (Nov) Export intraday and EOD data to TXT files One file for each stock In the first line insert the directory you want to save them to, make sure the directory exists Select your charts to export with the Apply to filter in AA window Select the timeframe period you want to save as using the AA Settings Press Scan button The data is now saved to txt files with US times adjusted for the next timezone season. To Create the new database for new season Remove all data from the existing database (or create new one) Make the time shift in Database Settings - Intraday Settings to 0 (zero) Import the adjusted data with the import wizard. Now ready to rock and roll Oh sometimes the US and Aust do not change summer time on same weekend and this needs to be done twice with 1 hour adjustment each time :( by Graham Kavanagh 05 Mar 2004 */ fh = fopen( c:\\SaveData\\+Name()+.txt, w); if( fh ) { fputs( Ticker,Date,Time,Open,High,Low,Close,Volume \n, fh ); y = Year(); m = Month(); d = Day(); r = Hour(); e = Minute(); n = Second(); for( i = 0; i BarCount; i++ ) { fputs( Name() + , , fh ); ds = StrFormat(%02.0f-%02.0f-%02.0f,, y[ i ], m[ i ], d[ i ] ); fputs( ds, fh ); ts = StrFormat(%02.0f:%02.0f:%02.0f,, r[ i ],e[ i ],n[ i ] ); fputs( ts, fh ); qs = StrFormat(%.4f,%.4f,%.4f,%.4f,%.0f\n, O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] ); fputs( qs, fh ); } fclose( fh ); } Buy = 0; Cheers, Graham http://e-wire.net.au/~eb_kavan/ http://e-wire.net.au/%7Eeb_kavan/
[amibroker] Re: Stepping thru loop
Sure, just initialize a variable to track the number of highs then use PlotText to write out the count. Do the same for lows. e.g. (untested) highs = 1; ... if (bigHigh[bar]) { lookingForHigh = false; // now looking for low PlotText(HH + highs, bar, High[bar], colorGreen); highs++; } ... Mike --- In amibroker@yahoogroups.com, booker_1324 booker_1...@... wrote: Nice code Mike, to take this a step farther, is it posible to attach a label to each HHV and LLV such as HH1, HH2, HH3, LL1, LL2, and LL3 without referencing future quotes? --- In amibroker@yahoogroups.com, Mike sfclimbers@ wrote: What makes you think that you are changing the step size? From what I see, you're still advancing a single bar at a time. bigHigh = high Ref (hhv(high,50),-1); smallLow = low Ref (llv(low,50),-1); lookingForHigh = true; for (bar = 0; bar BarCount; bar++) { if (lookingForHigh) { if (bigHigh[bar]) { lookingForHigh = false; // now looking for low } } else { if (smallLow[bar]) { lookingForHigh = true; } } } Mike --- In amibroker@yahoogroups.com, Markus Witzler funnybiz@ wrote: Hello, I wonder if I can step thru a loop where the step size is being computed WITHIN the loop. An example: I want the loop to check for every bar until high Ref (hhv(high,50),-1). From THAT bar on, the loop should check if low Ref (llv(low,50),-1) occured. Say, the first condition is true on bar 50, the loop should afterwards start to check for the second ccondition from bar 51 until that condition is fullfilled, say on bar 80. From THAT bar on, it again should check for the first condition etc. The thing is that I can´t tell the loop the step size in ADVANCE and it may differ over the whole data range, depending on WHEN the condition beign checked for is true. Any ideas on this? Thanks Markus
[amibroker] Re: Stepping thru loop
Thanks Mike, That works great. You make it look too easy --- In amibroker@yahoogroups.com, Mike sfclimb...@... wrote: Sure, just initialize a variable to track the number of highs then use PlotText to write out the count. Do the same for lows. e.g. (untested) highs = 1; ... if (bigHigh[bar]) { lookingForHigh = false; // now looking for low PlotText(HH + highs, bar, High[bar], colorGreen); highs++; } ... Mike --- In amibroker@yahoogroups.com, booker_1324 booker_1324@ wrote: Nice code Mike, to take this a step farther, is it posible to attach a label to each HHV and LLV such as HH1, HH2, HH3, LL1, LL2, and LL3 without referencing future quotes? --- In amibroker@yahoogroups.com, Mike sfclimbers@ wrote: What makes you think that you are changing the step size? From what I see, you're still advancing a single bar at a time. bigHigh = high Ref (hhv(high,50),-1); smallLow = low Ref (llv(low,50),-1); lookingForHigh = true; for (bar = 0; bar BarCount; bar++) { if (lookingForHigh) { if (bigHigh[bar]) { lookingForHigh = false; // now looking for low } } else { if (smallLow[bar]) { lookingForHigh = true; } } } Mike --- In amibroker@yahoogroups.com, Markus Witzler funnybiz@ wrote: Hello, I wonder if I can step thru a loop where the step size is being computed WITHIN the loop. An example: I want the loop to check for every bar until high Ref (hhv(high,50),-1). From THAT bar on, the loop should check if low Ref (llv(low,50),-1) occured. Say, the first condition is true on bar 50, the loop should afterwards start to check for the second ccondition from bar 51 until that condition is fullfilled, say on bar 80. From THAT bar on, it again should check for the first condition etc. The thing is that I can´t tell the loop the step size in ADVANCE and it may differ over the whole data range, depending on WHEN the condition beign checked for is true. Any ideas on this? Thanks Markus