Traderji.com - Discussion forum for Stocks Commodities & Forex

ADX Scanner, Exploration and Back Test

Discuss ADX Scanner, Exploration and Back Test at the Technical Analysis within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hi Seniors, Can someone write an afl from the below mentioned conditions which can act ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > METHODS & STRATEGIES > Technical Analysis

Notices

Technical Analysis Discussion of all the principles involved in technical analysis.


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 17th July 2008, 06:08 PM
Member
 
Join Date: Feb 2006
Posts: 62
Thanks: 0
Thanked 2 Times in 2 Posts
abhinkoi is on a distinguished road
Reputation: 22
Default ADX Scanner, Exploration and Back Test

Hi Seniors,

Can someone write an afl from the below mentioned conditions which can act as a scanner, explorer and backtester -

BUY when –

+DI crosses –DI from bottom to top
+DI crosses ADX from bottom to top

SELL when –

-DI crosses +DI from bottom to top
+DI crosses ADX from top to bottom
-DI crosses ADX from bottom to top

Thanks in advance.

Cheers
Abhi
Reply With Quote
Sponsored Links
  #2  
Old 17th July 2008, 07:21 PM
Member
 
Join Date: Mar 2008
Posts: 111
Thanks: 381
Thanked 88 Times in 25 Posts
dhakkan will become famous soon enoughdhakkan will become famous soon enough
Reputation: 104
Default Re: ADX Scanner, Exploration and Back Test

Here's the AFL :

The backtest will not work properly as buy and sell are not balanced, you can use ExRem() to balance them (I have commented them, you can uncomment ).

//////////////////////////////////////////////////////////////////////////////
// TEST ADX
_SECTION_BEGIN("ADX TEST");
range = Param("Range",14,3,60,1);

px = PDI(range);
nx = MDI(range);
ax = ADX(range);

// Buy Conditions
bcon1 = Cross(px,nx);
bcon2 = Cross(px,ax);
Buy = bcon1 OR bcon2;

// Sell Conditions
scon1 = Cross(nx,px);
scon2 = Cross(ax,px);
scon3 = Cross(nx,ax);
Sell = scon1 OR scon2 OR scon3;

// Explorer
Filter = Buy OR Sell;
AddColumn(Buy,"Buy",1);
AddColumn(Sell,"Sell",1);

// balancing buy sell
///Buy = ExRem(Buy, Sell);
//Sell = ExRem(Sell, Buy);

/// Plots
Plot(px,"+DI",colorGreen,1);
Plot(nx,"-DI",colorRed,1);
Plot(ax,"ADX",colorBlue,5);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBl ue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colo rDarkRed);
_SECTION_END();
Reply With Quote
  #3  
Old 17th July 2008, 08:29 PM
Member
 
Join Date: Feb 2006
Posts: 62
Thanks: 0
Thanked 2 Times in 2 Posts
abhinkoi is on a distinguished road
Reputation: 22
Default Re: ADX Scanner, Exploration and Back Test

Thank you very much dear...its giving the desired results but when I click on scan it gives error 2 times and then show the results.

1st error -

Plot(nx,"-DI",colorRed,1);
Plot(ax,"ADX",colorBlue,5);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBl u
---------------------------------------------------^

Error 31.
Syntax error, expecting ')' or ','

==================

2nd error -


Plot(ax,"ADX",colorBlue,5);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBl ue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colo r
---------------------------------------------------^

Error 31.
Syntax error, expecting ')' or ','

Can you please remove these errors?
Otherwise its working fine.

Thx a million
Abhinav
Reply With Quote
  #4  
Old 17th July 2008, 08:40 PM
Member
 
Join Date: Mar 2008
Posts: 111
Thanks: 381
Thanked 88 Times in 25 Posts
dhakkan will become famous soon enoughdhakkan will become famous soon enough
Reputation: 104
Default Re: ADX Scanner, Exploration and Back Test

Oh.. It seems there are spaces... remove them "colorBl ue" and "colo r" remove the space...
and check all the lines...
I dont know how it happened...

also .. you can try to check the syntax... it will give you the exact error and you can fix it.

enjoy
Reply With Quote
  #5  
Old 17th July 2008, 09:16 PM
Member
 
Join Date: Feb 2006
Posts: 62
Thanks: 0
Thanked 2 Times in 2 Posts
abhinkoi is on a distinguished road
Reputation: 22
Default Re: ADX Scanner, Exploration and Back Test

Yes it worked fine. YOu hit right on the target.
Thanks a ton again.
Much appreciated...

Thx
Abhi
Reply With Quote
  #6  
Old 19th July 2008, 01:37 PM
Member
 
Join Date: Feb 2006
Posts: 62
Thanks: 0
Thanked 2 Times in 2 Posts
abhinkoi is on a distinguished road
Reputation: 22
Default Re: ADX Scanner, Exploration and Back Test

Hi Dhakkan,

In order to refine my scan results I have put in some additional conditions. Could you please modify the afl according to these -


BUY when –

+DI crosses –DI from bottom to top
+DI crosses ADX from bottom to top but only if –DI is lower than +DI

SELL when –

-DI crosses +DI from bottom to top
+DI crosses ADX from top to bottom but only if –DI is higher than +DI
-DI crosses ADX from bottom to top but only if +DI is lower than -DI

Thanks in advance

Cheers
Abhi
Reply With Quote
  #7  
Old 19th July 2008, 03:40 PM
Member
 
Join Date: Mar 2008
Posts: 111
Thanks: 381
Thanked 88 Times in 25 Posts
dhakkan will become famous soon enoughdhakkan will become famous soon enough
Reputation: 104
Default Re: ADX Scanner, Exploration and Back Test

Quote:
Originally Posted by abhinkoi View Post
Hi Dhakkan,

In order to refine my scan results I have put in some additional conditions. Could you please modify the afl according to these -


BUY when –

+DI crosses –DI from bottom to top
+DI crosses ADX from bottom to top but only if –DI is lower than +DI

SELL when –

-DI crosses +DI from bottom to top
+DI crosses ADX from top to bottom but only if –DI is higher than +DI
-DI crosses ADX from bottom to top but only if +DI is lower than -DI

Thanks in advance

Cheers
Abhi
Hi Abhi,

These are simple things, learn AFL .. it will help you, or you may end up reveling all your tricks to others..

Anyway's... edited the AFL and here it is....
Check if it suits your requirement or not...
/////////////////////////////////////////////////////////////////////////////////////
// TEST ADX
_SECTION_BEGIN("ADX TEST");
range = Param("Range",14,3,60,1);

px = PDI(range);
nx = MDI(range);
ax = ADX(range);

// Buy Conditions
bcon1 = Cross(px,nx);
bcon2 = Cross(px,ax) AND nx < px;
Buy = (bcon1) OR (bcon2);

// Sell Conditions
scon1 = Cross(nx,px);
scon2 = Cross(ax,px) AND nx > px;
scon3 = Cross(nx,ax) AND px < nx;
Sell = (scon1) OR (scon2) OR (scon3);

// Explorer
Filter = Buy OR Sell;
AddColumn(Buy,"Buy",1);
AddColumn(Sell,"Sell",1);

// balancing buy sell
///Buy = ExRem(Buy, Sell);
//Sell = ExRem(Sell, Buy);

/// Plots
Plot(px,"+DI",colorGreen,1);
Plot(nx,"-DI",colorRed,1);
Plot(ax,"ADX",colorBlue,5);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBl ue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colo rDarkRed);
_SECTION_END();
Reply With Quote
  #8  
Old 19th July 2008, 05:52 PM
Member
 
Join Date: Feb 2006
Posts: 62
Thanks: 0
Thanked 2 Times in 2 Posts
abhinkoi is on a distinguished road
Reputation: 22
Smile Re: ADX Scanner, Exploration and Back Test

Thank you very much dear..yes its working absolutely the way I wanted it to work. You are amazing..I am in the process of learning it but till the time I get expert like you I need help and guidance from you experts in writing my mind (tricks which come to my mind). I hope you dont mind helping me and of course anyone who is seeing this thread...

If we are able to develop a strategy which can be beneficial to all it wud be a great help to the trading community.

Thanks a million for your unconditional and timely help. Much appreciated.

Thanks
Abhi
Reply With Quote
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 12:20 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