[amibroker] Re: A Dumb Basic Question on Array Shifting
Thanks, G. That clarifies. --- In amibroker@yahoogroups.com, Graham kavemanpe...@... wrote: each array is aligned with the data that it is based on. MA(C,5) is aligned to the close array, no offset applied This would align the ma with the Close3 Close3 = ref( C, -3 ); Centreline3 = ma( Close3, 5 ); Buy = Close3 Centreline3; If you want the signal to be CMA and just have entry 3 bars later, then B is correct Of course you could always use something like this settradedelays(3,1,3,1); Buy = cma(c,5); or if you only want to scan on bar before the entry then simplified settradedelays(1,1,1,1); Buy = ref( cma(c,5), -3 ); -- Cheers Graham Kav AFL Writing Service http://www.aflwriting.com 2009/4/15 ozzyapeman zoopf...@...: I know this is AFL 101 but I'm a bit confused on it. Let's say I wanted to Buy today if the Close of three days ago was higher than its center line moving average. I know I have to shift the Close array, but do I also have to shift the MA array to make this comparison? My thought is yes. So of the two formulas below, Formula B should be the correct one. Or is it? Does AFL automatically shift built-in function arrays when making comparisons? In that case, Formula A would be correct. Formula A CenterLine = MA(C, 5); Close3 = Ref(Close, -3); Buy = Close3 CenterLine Formula B CenterLine = MA(C, 5); CenterLine3 = Ref(CenterLine, -3); Close3 = Ref(Close, -3); Buy = Close3 CenterLine3
[amibroker] CORONA CHARTS
hi, this is in rference to the code for the john ehlers corona chart posted by Tomasz in the TASC mag issue dated November 2008. after checking the same with tradestaion code,found tht the code is wrong sumwhere as the values dont match at all,nor does the spectrum dominant cycle lines.The swing position indicators doesnt match at all with the original tradestation version. also the code for other 2 indicators of the corona set(signal to noise ratio, and trend vigor) is missing. can Tomasz or any1 pls help me with this. thnks.
[amibroker] Parameters Properties box
Hi, my AB parameters dialog box is blank for both parameters tab and axes grid tab. Tried restarting the app, but no luck. Any ideas? Newbie, with ver 5.2 thanks, Chris.
[amibroker] from where can i get download us dollar index historical eod data
plzzz friends help me from where can i get download us dollar index historical eod data and also day to day recent data like we can in nseindia.com for each and evrey stocks in .csv filesend me on v_pate...@yahoo.com
[amibroker] Building a small GUI around AmiBroker
Hi , I would like to build a Small GUI around AmiBroker to place orders with IB. I would like to trigger the order placement manually from the GUI (by clicking a button or so) and then calculate the stop loss, profit amount and all of that dynamically using Amibroker formulae and then place the final order through the IB controller. How do I build the GUI ? Can I build the GUI in VB/C# and call it as a COM component from AmiBroker (not the other way) and the button events triggering AmiBroker formulae and all such things? I am sure I am not the first person who likes to do this. What are my options and do you know of any other approaches ? Thanks Ram
[amibroker] Re: Gravity center mustafa Belkhayate
Two questions remain: - How does one backtest such a system (future looking)? - Can results be improved by Martingale strategy? (I understand averaging in is used by some professional traders) Regards Conrad --- In amibroker@yahoogroups.com, Edward Pottasch empotta...@... wrote: yes you are right. I know all this but it took a while for me to find out what they are actually doing. System seems to have quite a group of followers so I assumed that they know what they are doing. regards, Ed - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 11:07 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate It is a matter whenever given filter is causal or not. http://en.wikipedia.org/wiki/Causal_filter http://en.wikipedia.org/wiki/Causal_system Acausal filter (like this Gravity center) looks into the future. As any system that looks into the future, it will generate great results on paper, but will fail miserably in real trading. Causal filters (like regular moving averages, EMAs, etc) are free from future leak, but because they are causal, they introduce delay. The delay causes profitability drop. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Edward Pottasch To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 10:42 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate link of the chart: http://forex-strategies-revealed.com/files/pictures_strategies/cog_1s.png - Original Message - From: Edward Pottasch To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 10:38 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate they posted the rules somewhere and mentioned it should be of the 4-th order. Found a chart posted that illustrates the repainting and shows what is wrong with the system. Originally the centre polynomial was heading down, turning up sharply when the market moved up ersing the original polynomial fit. I do not understand why all these people are so happy about this system. Looks like an easy money maker until you find out that the polynomials change all the time. rgds, Ed - Original Message - From: Ed Hoopes To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 4:18 AM Subject: [amibroker] Re: Gravity center mustafa Belkhayate 4th degree - perhaps. You can tell the degree by how many inflections there are in the plot of the indicator as follows: zero inflections - a straight line - linear regression line One inflection - a parabola - a quadratic equation Two inflections - a cubic equation ax^3+bx^2+cx+d=0 Part way through the UTube video I saw two inflections. Three inflections - a 4th order polynomial can produce 3 changes in slope - inflections. I only saw two in the video. As you get to higher order polynomials, the plots on the price graph look more and more like a simple moving average plot - but requiring much more computation. ReefBreak --- In amibroker@yahoogroups.com, Edward Pottasch empottasch@ wrote: seems this centre of gravity system is based on polynomial fit of the fourth degree. Seems to me that inherent to such a fit is repainting, meaning that when new information becomes available (new data) it will calculate a slightly different fit. Apparently some people made a version of this system that avoids repainting. Not sure yet how they do that. Also it seems that people seem to have success using the version of the system that repaints. I am not sure how people trade this when you can not do a reliable backtest. rgds, Ed - Original Message - From: Michel Guibert To: amibroker@yahoogroups.com Sent: Tuesday, April 14, 2009 5:27 PM Subject: RE: [amibroker] Re: Gravity center mustafa Belkhayate Apparently this is the official code under metatrader #property indicator_chart_window #property indicator_buffers 7 #property indicator_color1 Blue #property indicator_color2 DimGray #property indicator_color3 Red #property indicator_color4 Red #property indicator_color5 DimGray #property indicator_color6 LimeGreen #property indicator_color7 LimeGreen extern int Nmbr_Bars = 180; extern int Order = 3;
Re: [amibroker] Re: Gravity center mustafa Belkhayate
I think you can't backtest unless you recalculate the polynomial for every bar. Maybe use 240 bars to calculate the polynomial, like a moving polynomial. But when plotting a moving polynomial the bands will not look that pretty, it will just look like a moving average. On one of these forums they mention that they made a version that does not repaint. I couldn't figure out from looking at the mq4 code what they did but I am pretty sure that it is just an ordinary polynomial fit. It is an ideal system to sell. It looks great and it can't be backtested. And if you use the polynomial as shown in the chart to do your backtest you will get great results but they are false results. regards, Ed - Original Message - From: conrad_faber To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 12:13 PM Subject: [amibroker] Re: Gravity center mustafa Belkhayate Two questions remain: - How does one backtest such a system (future looking)? - Can results be improved by Martingale strategy? (I understand averaging in is used by some professional traders) Regards Conrad --- In amibroker@yahoogroups.com, Edward Pottasch empotta...@... wrote: yes you are right. I know all this but it took a while for me to find out what they are actually doing. System seems to have quite a group of followers so I assumed that they know what they are doing. regards, Ed - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 11:07 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate It is a matter whenever given filter is causal or not. http://en.wikipedia.org/wiki/Causal_filter http://en.wikipedia.org/wiki/Causal_system Acausal filter (like this Gravity center) looks into the future. As any system that looks into the future, it will generate great results on paper, but will fail miserably in real trading. Causal filters (like regular moving averages, EMAs, etc) are free from future leak, but because they are causal, they introduce delay. The delay causes profitability drop. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Edward Pottasch To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 10:42 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate link of the chart: http://forex-strategies-revealed.com/files/pictures_strategies/cog_1s.png - Original Message - From: Edward Pottasch To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 10:38 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate they posted the rules somewhere and mentioned it should be of the 4-th order. Found a chart posted that illustrates the repainting and shows what is wrong with the system. Originally the centre polynomial was heading down, turning up sharply when the market moved up ersing the original polynomial fit. I do not understand why all these people are so happy about this system. Looks like an easy money maker until you find out that the polynomials change all the time. rgds, Ed - Original Message - From: Ed Hoopes To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 4:18 AM Subject: [amibroker] Re: Gravity center mustafa Belkhayate 4th degree - perhaps. You can tell the degree by how many inflections there are in the plot of the indicator as follows: zero inflections - a straight line - linear regression line One inflection - a parabola - a quadratic equation Two inflections - a cubic equation ax^3+bx^2+cx+d=0 Part way through the UTube video I saw two inflections. Three inflections - a 4th order polynomial can produce 3 changes in slope - inflections. I only saw two in the video. As you get to higher order polynomials, the plots on the price graph look more and more like a simple moving average plot - but requiring much more computation. ReefBreak --- In amibroker@yahoogroups.com, Edward Pottasch empottasch@ wrote: seems this centre of gravity system is based on polynomial fit of the fourth degree. Seems to me that inherent to such a fit is repainting, meaning that when new information becomes available (new data) it will calculate a slightly different fit. Apparently some people made a version of this system that avoids repainting. Not sure yet how they do that. Also it seems that people seem to have success using the version of the system that repaints. I am not sure how people trade this when you can not do a reliable backtest. rgds, Ed - Original Message - From: Michel Guibert To: amibroker@yahoogroups.com Sent: Tuesday, April
[amibroker] Re: Gravity center mustafa Belkhayate
Thx Ed I think I get your drift. Recalculate the poly per bar and populate an array(s) with the would have been results to be used in backtesting. If you look past the fancy math you will find this is just a mean reversion system so that likely turning points (extremes) can be found by other (simpler) means. I was just as skeptical as you but there are a number of these types of systems floating around that are supposedly highly profitable so I am having second thoughts. I suspect that MM techniques may have a lot to do with it. Regards Conrad --- In amibroker@yahoogroups.com, Edward Pottasch empotta...@... wrote: I think you can't backtest unless you recalculate the polynomial for every bar. Maybe use 240 bars to calculate the polynomial, like a moving polynomial. But when plotting a moving polynomial the bands will not look that pretty, it will just look like a moving average. On one of these forums they mention that they made a version that does not repaint. I couldn't figure out from looking at the mq4 code what they did but I am pretty sure that it is just an ordinary polynomial fit. It is an ideal system to sell. It looks great and it can't be backtested. And if you use the polynomial as shown in the chart to do your backtest you will get great results but they are false results. regards, Ed - Original Message - From: conrad_faber To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 12:13 PM Subject: [amibroker] Re: Gravity center mustafa Belkhayate Two questions remain: - How does one backtest such a system (future looking)? - Can results be improved by Martingale strategy? (I understand averaging in is used by some professional traders) Regards Conrad --- In amibroker@yahoogroups.com, Edward Pottasch empottasch@ wrote: yes you are right. I know all this but it took a while for me to find out what they are actually doing. System seems to have quite a group of followers so I assumed that they know what they are doing. regards, Ed - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 11:07 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate It is a matter whenever given filter is causal or not. http://en.wikipedia.org/wiki/Causal_filter http://en.wikipedia.org/wiki/Causal_system Acausal filter (like this Gravity center) looks into the future. As any system that looks into the future, it will generate great results on paper, but will fail miserably in real trading. Causal filters (like regular moving averages, EMAs, etc) are free from future leak, but because they are causal, they introduce delay. The delay causes profitability drop. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Edward Pottasch To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 10:42 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate link of the chart: http://forex-strategies-revealed.com/files/pictures_strategies/cog_1s.png - Original Message - From: Edward Pottasch To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 10:38 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate they posted the rules somewhere and mentioned it should be of the 4-th order. Found a chart posted that illustrates the repainting and shows what is wrong with the system. Originally the centre polynomial was heading down, turning up sharply when the market moved up ersing the original polynomial fit. I do not understand why all these people are so happy about this system. Looks like an easy money maker until you find out that the polynomials change all the time. rgds, Ed - Original Message - From: Ed Hoopes To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 4:18 AM Subject: [amibroker] Re: Gravity center mustafa Belkhayate 4th degree - perhaps. You can tell the degree by how many inflections there are in the plot of the indicator as follows: zero inflections - a straight line - linear regression line One inflection - a parabola - a quadratic equation Two inflections - a cubic equation ax^3+bx^2+cx+d=0 Part way through the UTube video I saw two inflections. Three inflections - a 4th order polynomial can produce 3 changes in slope - inflections. I only saw two in the video. As you get to higher order polynomials, the plots on the price graph look more and more like a simple moving average plot - but requiring much more computation. ReefBreak
Re: [amibroker] Re: Gravity center mustafa Belkhayate
it puzzels me also that some claim to make money with it. 1 of them is Oanfx. He distributes his system free but he is really vague about how you should use it. However I think he will explain in more detail when you pay 50$/month: http://oan4x.com/news/latest/pricing.html regards, Ed - Original Message - From: conrad_faber To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 1:20 PM Subject: [amibroker] Re: Gravity center mustafa Belkhayate Thx Ed I think I get your drift. Recalculate the poly per bar and populate an array(s) with the would have been results to be used in backtesting. If you look past the fancy math you will find this is just a mean reversion system so that likely turning points (extremes) can be found by other (simpler) means. I was just as skeptical as you but there are a number of these types of systems floating around that are supposedly highly profitable so I am having second thoughts. I suspect that MM techniques may have a lot to do with it. Regards Conrad --- In amibroker@yahoogroups.com, Edward Pottasch empotta...@... wrote: I think you can't backtest unless you recalculate the polynomial for every bar. Maybe use 240 bars to calculate the polynomial, like a moving polynomial. But when plotting a moving polynomial the bands will not look that pretty, it will just look like a moving average. On one of these forums they mention that they made a version that does not repaint. I couldn't figure out from looking at the mq4 code what they did but I am pretty sure that it is just an ordinary polynomial fit. It is an ideal system to sell. It looks great and it can't be backtested. And if you use the polynomial as shown in the chart to do your backtest you will get great results but they are false results. regards, Ed - Original Message - From: conrad_faber To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 12:13 PM Subject: [amibroker] Re: Gravity center mustafa Belkhayate Two questions remain: - How does one backtest such a system (future looking)? - Can results be improved by Martingale strategy? (I understand averaging in is used by some professional traders) Regards Conrad --- In amibroker@yahoogroups.com, Edward Pottasch empottasch@ wrote: yes you are right. I know all this but it took a while for me to find out what they are actually doing. System seems to have quite a group of followers so I assumed that they know what they are doing. regards, Ed - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 11:07 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate It is a matter whenever given filter is causal or not. http://en.wikipedia.org/wiki/Causal_filter http://en.wikipedia.org/wiki/Causal_system Acausal filter (like this Gravity center) looks into the future. As any system that looks into the future, it will generate great results on paper, but will fail miserably in real trading. Causal filters (like regular moving averages, EMAs, etc) are free from future leak, but because they are causal, they introduce delay. The delay causes profitability drop. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Edward Pottasch To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 10:42 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate link of the chart: http://forex-strategies-revealed.com/files/pictures_strategies/cog_1s.png - Original Message - From: Edward Pottasch To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 10:38 AM Subject: Re: [amibroker] Re: Gravity center mustafa Belkhayate they posted the rules somewhere and mentioned it should be of the 4-th order. Found a chart posted that illustrates the repainting and shows what is wrong with the system. Originally the centre polynomial was heading down, turning up sharply when the market moved up ersing the original polynomial fit. I do not understand why all these people are so happy about this system. Looks like an easy money maker until you find out that the polynomials change all the time. rgds, Ed - Original Message - From: Ed Hoopes To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 4:18 AM Subject: [amibroker] Re: Gravity center mustafa Belkhayate 4th degree - perhaps. You can tell the degree by how many inflections there are in the plot of the indicator as follows: zero inflections - a straight line - linear
Re: [amibroker] CORONA CHARTS
They match as long as same data is used. The reason for differences is different data (even small differences in data may lead to very different results). Best regards, Tomasz Janeczko amibroker.com - Original Message - From: anilcap200 anilcap...@yahoo.com To: amibroker@yahoogroups.com Sent: Friday, April 10, 2009 7:27 PM Subject: [amibroker] CORONA CHARTS hi, this is in rference to the code for the john ehlers corona chart posted by Tomasz in the TASC mag issue dated November 2008. after checking the same with tradestaion code,found tht the code is wrong sumwhere as the values dont match at all,nor does the spectrum dominant cycle lines.The swing position indicators doesnt match at all with the original tradestation version. also the code for other 2 indicators of the corona set(signal to noise ratio, and trend vigor) is missing. can Tomasz or any1 pls help me with this. thnks. 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] auto analysis wait for backfill
i use Ole to access Automatic analyais a lot. many times, i find that i had turned off wait for backfill and my results are incorrect. is there a way to check it thro afl or thro Ole,
[amibroker] How can I implement to PnF by Graham Kavanagh 17 Apr 2004
Hello, I use PF chart based on closing price by Graham Kavanagh, 17 Apr 2004. This is very helpfull tools for me. Some time ago I found the following code for another PnF and I would like to implement Exploration Settings to Graham's PnF chart. Please help me. I try, try and nothing. Best regards. Dominik // part of code pattern = ; doubleTop = ; tripleTop = ; tripleBot = ; AscTriangle = ; DescTriangle = ; doubleBot =; rectangle = ; SymTriangle = ; Catapult = ; _SECTION_BEGIN(Exploration Settings); fr = Param(from, 3, 3, 100,1); to = Param(to, 50, 10, 100,1)+1; _SECTION_END(); for (b = fr; bto; b++) { Box = b/decimals; pf(box); btxt = NumToStr(b, 3.0); eq2 = Cl[x] == Cl[x-2]; eq3 = eq2 Cl[x-2] == Cl[x-4]; if(eq2) { if (direction[x] ) doubleTop = doubleTop + + btxt; else doubleBot = doubleBot + + btxt; } if (eq3) { if (direction[x] ) tripletop = tripletop + + btxt; else tripleBot = tripleBot + + btxt; } if ( eq3 == Cl[x-4] range[x-3] range[x-1] range[x-4] 1.2* range[x-3]) { if(direction[x]) AscTriangle = AscTriangle + + btxt; else DescTriangle = DescTriangle + + btxt; } match = 0; for ( num = 1; num 5; num++) { if( range[x]- range[x-num]==0) match ++; } if (match ==4) rectangle = rectangle + + btxt; if (range[x]- range[x-1]== range[x-1]- range[x-2] range[x-1]- range[x-2] == range[x-2] - range[x-3] range[x] range[x-1] range[x-4] 1.2* range[x-3]) SymTriangle = SymTriangle + + btxt; C1 = eq2 Cl[x-4] == Cl[x-6]; C2 = AlmostEqual(Cl[x-2] - Cl[x-4], -box,50) !direction[x]; C3 = AlmostEqual(Cl[x-2] - Cl[x-4], box,50) direction[x]; C4 = C2 || C3; if( C1 C2 || C1 C3) Catapult = Catapult + + btxt; } Filter = 1; format = 8.0; CellWidth = 70; AddTextColumn( doubleTop, DoubleTop,format, colorBlue, colorDefault, CellWidth); AddTextColumn( doublebot, DoubleBottom, format, colorRed, colorDefault, CellWidth); AddTextColumn( tripleTop, TripleTop,format, colorBlue, colorDefault, CellWidth); AddTextColumn( tripleBot, TripleBottom, format, colorRed, colorDefault, CellWidth); AddTextColumn( AscTriangle, AscTriangle, format, colorBlue, colorDefault, CellWidth); AddTextColumn( DescTriangle,DescTriangle, format, colorRed, colorDefault, CellWidth); AddTextColumn( rectangle, Range,format, colorGrey50, colorDefault, CellWidth); AddTextColumn( symTriangle, SymTriangle, format, colorGrey50, colorDefault, CellWidth); AddTextColumn( catapult,Catapult, format, colorGrey50, colorDefault, CellWidth);
[amibroker] Amiquote question for Tomasz
Hi Tomasz, Just a couple of suggestions re amiquote Instead of using the Yahoo timestamp, why not have an option to use the local computer time instead. It's much better than the Yahoo date fix, solves so many problems and a huge step forward. Will any future version allow amiquote to be used as a data feed tool to any software? Regards, Stef
[amibroker] Re: Building a small GUI around AmiBroker
if you want a gui to do order management, why don't you do it directly against ib. http://www.codeplex.com/ibcsharp has a few starter functionality --- In amibroker@yahoogroups.com, agastya.ganti agastya.ga...@... wrote: Hi , I would like to build a Small GUI around AmiBroker to place orders with IB. I would like to trigger the order placement manually from the GUI (by clicking a button or so) and then calculate the stop loss, profit amount and all of that dynamically using Amibroker formulae and then place the final order through the IB controller. How do I build the GUI ? Can I build the GUI in VB/C# and call it as a COM component from AmiBroker (not the other way) and the button events triggering AmiBroker formulae and all such things? I am sure I am not the first person who likes to do this. What are my options and do you know of any other approaches ? Thanks Ram
Re: [amibroker] Re: Building a small GUI around AmiBroker
Hi, Although I use NinjaTrader for placing orders, I do essentially the same thing. I have a simple VB app that invokes the API with the press of a button. On the AB side, what I do is at the very beginning of a new bar, I write the previous bar's relevant data (whatever you would use to calculate your entry, target and stop numbers) and read the file in the VB app. I posted the code to write the file from AB recently -- if you search for my name, it would be within the past four weeks (sooner, I believe). Regards, Gordon if you want a gui to do order management, why don't you do it directly against ib. http://www.codeplex.com/ibcsharp has a few starter functionality --- In amibroker@yahoogroups.com, agastya.ganti agastya.ga...@... wrote: Hi , I would like to build a Small GUI around AmiBroker to place orders with IB. I would like to trigger the order placement manually from the GUI (by clicking a button or so) and then calculate the stop loss, profit amount and all of that dynamically using Amibroker formulae and then place the final order through the IB controller. How do I build the GUI ? Can I build the GUI in VB/C# and call it as a COM component from AmiBroker (not the other way) and the button events triggering AmiBroker formulae and all such things? I am sure I am not the first person who likes to do this. What are my options and do you know of any other approaches ? Thanks Ram
Re: [amibroker] Re: Building a small GUI around AmiBroker
Hello, Actually you don't really need to build gui as it is already there in the form of parameter window that can be used to place orders. Sample code is included in the docs: http://www.amibroker.com/at/ Excerpt: Example 3: 3. Placing/modifying manually from Parameters dialog. Code to be applied in Indicator Builder. (Modified to use new features in 1.0.2) This code can be run many times and it will modify existing order as long as it is not transmitted. It uses static variables to store orderId from last run. // Param block TriggerOrder= ParamTrigger(Place order,Click here to place order); Mode=ParamToggle(Mode,Modify existing|Always place new order); ACT = ParamList(Action, BUY|SELL|SSHORT); OT = ParamList(Order Type, MKT|LMT|STP); TIF = ParamList(Time In Force, DAY|GTC|IOC); Ticker = ParamStr(Ticker,Name()); NumShares = Param(Number of Shares,10,10,100,10); LimitPrice = LastValue(C) + Param(Limit Price offset,0,-0.1,0.1,0.01); StopPrice = LastValue(C) + Param(Stop price offset,0,-0.1,0.1,0.01); Transmit = ParamToggle(Transmit,Do NOT transmit|Transmit,0); TriggerCancel = ParamTrigger(Cancel Order,Click here to Cancel order); Msg = ; // this variable stores error message text // create instance of trading interface ibc = GetTradingInterface(IB); // retrieve orderID from previous run, will be empty if no order was placed before OrderID = StaticVarGetText(OrderID+Ticker); if( TriggerOrder ) { // check if we are connected OK if( ibc.IsConnected() ) { if( Mode == 1 ) OrderID = ; // if mode set to 'always new' then clear orderid // place orders only if we do not have already open position on this symbol // place or modify the order - don't transmit yet OrderID = ibc.ModifyOrder( OrderID, Ticker, ACT, NumShares, OT, LimitPrice, StopPrice, TIF, Transmit); // store orderID for next run so we know which order to modify StaticVarSetText(OrderID+Ticker, OrderID); if( Mode == 1 ) Msg = New order has been placed with ID = ; else Msg = Order placed/modified with ID = ; Msg = Msg + OrderID + on + Now(); } else { Msg = Placing order failed because of no connection to TWS; } } if( TriggerCancel ) { if( OrderId != ) { if( ibc.CancelOrder( OrderId ) ) Msg = Request to cancel order + OrderID + sent successfully; else Msg = Request to cancel order + OrderID + failed.; } else Msg = Can not cancel order becase OrderID is empty; } // monitoring code Title = Msg + \nLast TWS message: + ibc.GetLastError(0) + \nAvailable funds: + ibc.GetAccountValue(AvailableFunds)+ Gross Pos. Value: + ibc.GetAccountValue(GrossPositionValue)+ \nOrderID = +OrderId+ \nTicker = +Ticker+ \nAction = +ACT+ \nShares = +NumToStr(NumShares,1.0)+ \nOrderType = +OT+ \nLimitPrice = +NumToStr(LimitPrice,1.3)+ \nStopPrice = +NumToStr(StopPrice,1.3)+ \nTimeInForce= +TIF+ \nTransmit = +NumToStr(Transmit,1.0)+\n+ \nGetStatus = +ibc.GetStatus( OrderID )+ \nGetPositionSize = +ibc.GetPositionSize( Ticker )+ \nIsConnected = +NumToStr(ibc.IsConnected(),1.0); Best regards, Tomasz Janeczko amibroker.com - Original Message - From: murthysuresh mo...@sweetfolks.com To: amibroker@yahoogroups.com Sent: Wednesday, April 15, 2009 8:29 PM Subject: [amibroker] Re: Building a small GUI around AmiBroker if you want a gui to do order management, why don't you do it directly against ib. http://www.codeplex.com/ibcsharp has a few starter functionality --- In amibroker@yahoogroups.com, agastya.ganti agastya.ga...@... wrote: Hi , I would like to build a Small GUI around AmiBroker to place orders with IB. I would like to trigger the order placement manually from the GUI (by clicking a button or so) and then calculate the stop loss, profit amount and all of that dynamically using Amibroker formulae and then place the final order through the IB controller. How do I build the GUI ? Can I build the GUI in VB/C# and call it as a COM component from AmiBroker (not the other way) and the button events triggering AmiBroker formulae and all such things? I am sure I am not the first person who likes to do this. What are my options and do you know of any other approaches ? Thanks Ram 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] IB
Hi, hope someone can help me. When Amibroker is backfilling e.g. a Stock like AMGN (from Interactive Brokers)... I get also data over night, every minute, altough there is no volume. Volume = 0. As I know Amibroker has a maximum of 500.000 bars for backfilling. So I would rather not save the 0 volume data... Does this work? Is there a filter in Amibroker or in TWS? Another question, if the base time interval in Amibroker is set to EOD I still receive 1min bar data from IB... Is there a possibility just to receive EOD data from IB? Many thanks, dubi
[amibroker] AFL help
I am just starting in AFL, I've been able to make a few explorations with little and some difficulties but can't find those ones; Close price 52 week high Close price 5% 52 week high Little help would be appreciated Thanks
Re: [amibroker] from where can i get download us dollar index historical eod data
Our futures/spot data service offers US Dollar Index. History goes back to January 1971 and is updated every day if you subscribe to the update service. It can be exported daily into CSV format and is also fully compatible with AmiBroker too. Free trial available here: http://www.premiumdata.net/products/datatools/freetrial.php 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] from where can i get download us dollar index historical eod data From: v_patel86 v_pate...@yahoo.com To: amibroker@yahoogroups.com Date: tue, 14 apr 2009 17:12:53 - plzzz friends help me from where can i get download us dollar index historical eod data and also day to day recent data like we can in nseindia.com for each and evrey stocks in .csv filesend me on v_pate...@yahoo.com mailto:v_patel86%40yahoo.com
Re: [amibroker] AFL help
Hi Max -- I have written a book that might be helpful -- Introduction to AmiBroker. www.introductiontoamibroker.com It is a tutorial and reference for AmiBroker, and includes a series of 10 exercises that take you from charting through backtesting, optimization, and walk forward testing. Thanks, Howard www.blueowlpress.com On Wed, Apr 15, 2009 at 2:43 PM, max_pare max_p...@yahoo.com wrote: I am just starting in AFL, I've been able to make a few explorations with little and some difficulties but can't find those ones; Close price 52 week high Close price 5% 52 week high Little help would be appreciated Thanks
[amibroker] Re: from where can i get download us dollar index historical eod data
I might be available on MSN. Try this link for starters and then adapt for the symbol you want. This blog link explains how to get all kinds of forex pairs into ami using MSN. http://blog.tipster.ca/2007/12/how-to-get-forex-quotes-from-msn-into.html --- In amibroker@yahoogroups.com, v_patel86 v_pate...@... wrote: plzzz friends help me from where can i get download us dollar index historical eod data and also day to day recent data like we can in nseindia.com for each and evrey stocks in .csv filesend me on v_pate...@...
[amibroker] Change volume data
I have EOD data for all the european exchanges in metastock format. Since they trade in different currencies, when I use the provided data, it is not possible to do an accurate backtest of my system since the minimum liquidity rules I have will not be uniform, say Frankfurt exchange data mingled with Oslo exchange data. One way I can think of helping me with this would be to convert the metastock data for Oslo data by increasing the volume data by a factor of 8 since that would approximate the difference in exchange rate for Euro vs Krone. Not perfect but would give me a decent approximation. I can import in the metastock data into amibroker easy enough. Is anyone aware of a way to batch update all the volume data to be 8x more than reported? Thanks, John
[amibroker] Alpha, Semi-Transparent , or Translucent Colors
Hi, I've been trying to draw the name of a symbol along with its one day percent gain/loss as background text in my charts, but I am finding that it sometimes is difficult to read under the candlestick price data. I was wondering if it would be possible to specify an alpha, or transparency, value to the colors of various things to facilitate this. For instance, if I could make my text 50% transparent, I could draw it on top of the chart and see both layers better. I haven't been able to find anything in afl that supports this, so I assume that it would need to be added. An AFL function such as ColorARGB( alpha, red, green, blue) or ColorRGBA would be nice. Any thoughts on this? Thanks, Chris
[amibroker] ASX Symbols for IB
I am trying to setup IB TWS with AB using connector/plugin. The connection is working but I am unable to figure out what the symbol construction is to be added symbol tree. I have tried - BHP, b...@asx - both give a message symbol invalid - consult symbology manual. Could someone either respond with a ASX symbol construct for AB or point me to the symbology manual (a search of KB and Group DB came up empty) Thanks Ed