Traderji.com - Discussion forum for Stocks Commodities & Forex

Help needed for this simple afl

Discuss Help needed for this simple afl at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hello friends, 1st Afl ======= Can anyone help me to write this simple trading system ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Software > AmiBroker

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 14th September 2008, 01:04 AM
Member
 
Join Date: Sep 2006
Posts: 69
Thanks: 4
Thanked 5 Times in 4 Posts
bamks is on a distinguished road
Reputation: 25
Default Help needed for this simple afl

Hello friends,


1st Afl
=======
Can anyone help me to write this simple trading system to backtest.
The buy criteria goes as such;

Buy on the third bar in a series of three consecutive higher highs and
the buy bar (ie the third bar) must be a bar whose close is greater than the open.
So far things are ok but I want to sell on the fourth bar close.
Please make the necessary correction in the afl below.

I want to sell on the next day of the buy bar and run the system to see
how many winners and losers will this system give me over a given period.



Cond1 = High > Ref(High,-1) AND Ref(High,-1) > Ref(High,-2);

Filter = 1 AND Cond1 and C > H;

buy = Cond1 and C > H;

// I want to sell on the next day of the buy
Sell = ????;

If I write the sell statement as
Sell = Ref(Close,1); then I get numerious red arrows following the above criteria and the system
does not give correct values when I back test it or when I click for report generation.

On the basis of selling the following day I can use a number of combinations as filters and get some simple trading systems.
The afl can give which criterias are a good one day winners. Of course this is a system and one can get more losers than winners.





2nd AFL
=======

One sees various coloured labels corresponding to indicators in the right side in the price label axis.
The last traded price or Close is in black.

I want to write for example an afl which will correspond to a particular criteria eg.
if the current close is above the 200 dma so the same should be filtered and shown


one can write
Filter = Cross(Close, dma(close,200);

but since i have the dma line on the chart in the colour red and a red label on the value label axis on the right
with a numerical value corresponding to the last dma(200) value. I also have a close price label of the last bar
in black,

How can I write the same filter as above but using only the label colours which I know before hand.


Thanks in advance,
bam
Reply With Quote
Sponsored Links

Sponsored Links
Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +5.5. The time now is 11:42 AM.

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.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com