![]() |
|
| Discuss AmiBroker formula Language at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Dear Praveen & Subratabera, Thanx for providing me with the afl. My apologies for replying ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#111
|
|||
|
|||
|
Dear Praveen & Subratabera,
Thanx for providing me with the afl. My apologies for replying so late. AFL works fine, but when i backtest it, it gives only for longs, whereas shorts should also be there. As per the system when a long is closed, then short is intiated at that very same time. Is it possible to incorporate that too in AFL. Thx for all the help and looking forward to an early reply. Sunil p.s. How do i add ur message while replying, at the moment i m just copying and pasting Unread 22nd March 2007, 07:56 AM bvpraveen bvpraveen is offline Senior Member Join Date: May 2006 Location: Bangalore Posts: 605 bvpraveen is on a distinguished road Default Re: AmiBroker formula Language Quote: Originally Posted by sunilhv0 View Post ... Basically i m looking for an AFL for crossover of EMA 5 and EMA 13. ... Hi, To add to Subratabera's code, the below AFL is the generalized one. You can give any EMA periods to both short and long periods. You can use it for Explore also in Automatic Analysis. Code: _SECTION_BEGIN("EmaCrossoverSystem"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) )); ShortPeriod = Param("ShortPeriod", 5, 2, 200, 1); LongPeriod = Param("LongPeriod", 13, 2, 200, 1); Buy=Cross(EMA(C,ShortPeriod),EMA(C,LongPeriod)); Sell=Cross(EMA(C,LongPeriod),EMA(C,ShortPeriod)); MYcolor = IIf( EMA(C,ShortPeriod) > EMA(C,LongPeriod) AND C>Peak(C,3,1), colorBrightGreen, IIf(EMA(C,LongPeriod) > EMA(C,ShortPeriod) AND C<Peak(C,3,1), colorRed, colorBlue)); PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar ); shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) ); Filter=Buy OR Sell; SetOption("NoDefaultColumns", True ); AddColumn( DateTime(), "Date", formatDateTime ); AddTextColumn( FullName(), "Full name", 77 , colorDefault, IIf( Buy, colorGreen, colorRed ) ); AddColumn( IIf( Buy, 66, 83 ), "Signal", formatChar, colorDefault, bkcolor =IIf (Buy,colorGreen, colorRed )); _SECTION_END(); Praveen. Reply With Quote |
|
#112
|
|||
|
|||
|
Quote:
Buy = Cover = Cross(EMA(C,ShortPeriod),EMA(C,LongPeriod)); Sell= Short = Cross(EMA(C,LongPeriod),EMA(C,ShortPeriod)); Quote:
Praveen. |
|
#113
|
|||
|
|||
|
[quote=bvpraveen;83672]Just make this changes:
Buy = Cover = Cross(EMA(C,ShortPeriod),EMA(C,LongPeriod)); Sell= Short = Cross(EMA(C,LongPeriod),EMA(C,ShortPeriod)); Click the "Quote" button at the right bottom corner of the post. Dear Praveen, Thx for such an early reply, it is working fine, wll fine tune it further with ur help. Thx a lot Sunil |
|
#114
|
|||
|
|||
|
Quote:
Praveen. |
|
#115
|
|||
|
|||
|
hello!!
Can somebody help me? How can I set that display function wich allows to see the candles: -if Close price higher then the last close price and within day the close price is higher then open price green hollow candle(normally can set in) -if Close price higher then the last close price BUT within day the close price is lowest than open price fully green candle!! -if Close price lowest than last Close price fully red candle - if Close price lowest than last Close price BUT within day Close price is higher than Open price posible to show red hollow candle? I tried to setup on Preferences but this option is not allowed.If I colouring the candles I can’t see the hollow candles(bullish days).I think it need a new formula but couldn’t made it. Thank you very much if you can help ... |
|
#116
|
|||
|
|||
|
Quote:
Go through this discussion and see if it helps you out: http://finance.groups.*****.com/grou...e&var=1&tidx=1 Praveen. |
|
#117
|
|||
|
|||
|
Quote:
Hollow Candle Gives hollow up candle with the shadow/outline in the selected colour, from either preferences colour or in the plot statement This works |
|
#118
|
|||
|
|||
|
dear friends,
I am using Futures Intra-day data provided by Soumya for study, especially NIFTY Fut. The Data is in Tick format which I can see in 1min, 5min, 15min, 1hr format easily. I want to create AFLs where the tick data will automatically get converted into 5min, 10 min, 15min, 30min and 1hr chart.... For this purpose I will have to use TimeFrameSet(). Can anybody help me how to use this function for required time period mentioned? have a nice day JB |
|
#119
|
|||
|
|||
|
Quote:
Praveen. |
|
#120
|
|||
|
|||
|
Hello friends,
Is it possible to fomulate Modified Moving Average in AFL? MAV is discussed in New Commodity Trading by Kaufman and Trading DiNapoli Levels by Joe DiNapoli Formula of MAV is as follows: MAVt=MAVt-1 + (P1 - MAVt-1)/n where MAVt is the current Modified Moving Average value MAVt-1 is the previoud days Modified Moving Average value P1 is current price n is number of periods The starting point is calculated identically to that of a simple Moving Average. Thanks Sudesh |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads for: AmiBroker formula Language
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need help on formula | cmlee | MetaStock | 23 | 8th October 2007 07:55 PM |
| Metastock ,Metatrader & Amibroker indicator formula | saji oommen | MetaStock | 0 | 4th June 2006 06:35 PM |
| Metastock language help | Ropewalker | MetaStock | 4 | 1st November 2005 09:16 PM |
| TradeStation & MetaStock Formula Language | bikertrader | MetaStock | 4 | 10th December 2004 01:50 PM |
Indemnity, Disclaimer & Disclosure
Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum
Rules Disclaimer & Disclosure and indemnify Traderji.com, its
associates and related parties of all claims howsoever resulting from
the usage of the forum.
• Disclaimer: Trading or investing in stocks & commodities
is a high risk activity. Any action you choose to take in the markets
is totally your own responsibility. Traderji.com will not be liable for
any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
• Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein.
The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.