Traderji.com - Discussion forum for Stocks Commodities & Forex


AFL code for EMA crossover

Discuss AFL code for EMA crossover at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hello, I am using one AFL code for EMA crossover on EOD charts, Its working ...


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


Reply
 
Thread Tools
  #1  
Old 2nd January 2010, 01:23 PM
Member
 
Join Date: Mar 2008
Posts: 30
Thanks: 10
Thanked 9 Times in 8 Posts
tangotaurian is on a distinguished road
Default AFL code for EMA crossover

Hello,
I am using one AFL code for EMA crossover on EOD charts, Its working fine on EOD, but not on Intraday charts, I want to use it on Intraday charts. I tried to make changes but not succeed.

Please find below mentioned AFL:-

x = EMA(Close,5);
y = EMA(Close,13);

Buy=Cross(x,y);
PlotShapes(shapeUpArrow*Buy,colorGreen);
Sell=Cross(y,x);
PlotShapes(shapeDownArrow*Sell,colorRed);
Plot(EMA(Close,5),"",colorBrightGreen,styleLine);
Plot(EMA(Close,13),"",colorRed,styleLine);
AlertIf( Buy, "SOUND C:\\Windows\\Media\\notify.wav", "Audio alert", 2 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\chord.wav", "Audio alert", 2 );
XR=(EMA(Close,5) * (2 / 6 - 1) - EMA(Close,13) * (2 / 11 - 1)) / (2 / 6 - 2 / 11);
Title = Name() + " " + Date()+" " + EncodeColor( colorBlue ) +"5/13 EMA " +EncodeColor( colorBlack )
+ " O " + O + " H " + H + " L " + L + " C "+ C + "\n";


Kindly modify this AFL to use it on Intraday charts.

Regards,
TT



Reply With Quote
Sponsored Links
  #2  
Old 2nd January 2010, 02:37 PM
vinodkiyer's Avatar
Member
 
Join Date: Feb 2009
Posts: 352
Thanks: 335
Thanked 417 Times in 202 Posts
vinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nice
Default Re: AFL code for EMA crossover

its working fine on intraday chart. nothing wrong with afl. see if your database settings and intraday settings in preferences is correct or not
Reply With Quote
  #3  
Old 2nd January 2010, 08:16 PM
Member
 
Join Date: Mar 2008
Posts: 30
Thanks: 10
Thanked 9 Times in 8 Posts
tangotaurian is on a distinguished road
Default Re: AFL code for EMA crossover

@vinodkiyer-yes, if u watch a single script of any time frame its showin right signals. But when u select this AFL through Automatic Analyser & click on Scan, its giving result for EOD chart. I want to scan different time frames(i.e. 5mins, 15mins, 60mins) on intraday, which will give me a result of intraday time frames. I guess da code is not developed for intraday but for EOD. One need to alter da code to work for intrday time frames.
Somebody please look into da issue.

Regards,
TT
Reply With Quote
  #4  
Old 2nd January 2010, 10:20 PM
Member
 
Join Date: Mar 2009
Posts: 197
Thanks: 36
Thanked 78 Times in 56 Posts
singhboy will become famous soon enough
Default Re: AFL code for EMA crossover

analysis-automatic analysis-settings-general-periodicity, select ur time period on which u want to scan
Reply With Quote
  #5  
Old 2nd January 2010, 10:38 PM
sahil79's Avatar
Member
 
Join Date: Oct 2009
Posts: 181
Thanks: 6
Thanked 5 Times in 5 Posts
sahil79 will become famous soon enough
Cool Re: AFL code for EMA crossover

Quote:
Originally Posted by vinodkiyer View Post
its working fine on intraday chart. nothing wrong with afl. see if your database settings and intraday settings in preferences is correct or not
bhai aap kaun sa ver amibroker use karte ho?
Reply With Quote
  #6  
Old 3rd January 2010, 05:24 AM
vinodkiyer's Avatar
Member
 
Join Date: Feb 2009
Posts: 352
Thanks: 335
Thanked 417 Times in 202 Posts
vinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nice
Default Re: AFL code for EMA crossover

U must do what Singhboy suggested every time u want to scan on a different periiodicity.

also add the following to the code as the last line:

Filter = Buy || Sell;
Reply With Quote
  #7  
Old 3rd January 2010, 09:46 AM
Member
 
Join Date: Mar 2009
Posts: 197
Thanks: 36
Thanked 78 Times in 56 Posts
singhboy will become famous soon enough
Default Re: AFL code for EMA crossover

Filter=(Volume>50000) AND (Buy OR Sell) AND (Close>100);
AddColumn(Close,"Close",1.4);
AddColumn(Buy,"buy",1.2);
AddColumn(Sell,"sell",1.2);
add this at end of AFL to scan, u can edit volume n price conditions wateva u want
Reply With Quote
  #8  
Old 3rd January 2010, 12:33 PM
Member
 
Join Date: Mar 2008
Posts: 30
Thanks: 10
Thanked 9 Times in 8 Posts
tangotaurian is on a distinguished road
Default Re: AFL code for EMA crossover

@singhboy-thnx a lot for your help. Now I can get signals for different different periiodicity. Even I`ve added a code for volume n price conditions n testing it now.

@vinodkiyer-thnx a lot for your help also. I`ve added a code, i guess its for filterin buy/sell...right???

M still learning AFL. M a slow learner. :-(

Regards,
TT
Reply With Quote
  #9  
Old 3rd January 2010, 04:44 PM
vinodkiyer's Avatar
Member
 
Join Date: Feb 2009
Posts: 352
Thanks: 335
Thanked 417 Times in 202 Posts
vinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nicevinodkiyer is just really nice
Default Re: AFL code for EMA crossover

use Singhboy's code above instead of mine then u can explore also
Reply With Quote
  #10  
Old 17th February 2010, 09:12 AM
Member
 
Join Date: Aug 2009
Location: Mumbai
Posts: 286
Thanks: 155
Thanked 224 Times in 131 Posts
hawaisanjay has a spectacular aura abouthawaisanjay has a spectacular aura abouthawaisanjay has a spectacular aura about
Default Re: AFL code for EMA crossover

Hi!
Can anybody suggest me AFL for following conditions...
TIME FRAME-ANY
EMA - 10,25,50
BUY- 10EMA CROSS FROM BELOW 25 & 50 EMA
EXIT- 25EMA CROSS FROM ABOVE 50 EMA
SELL- 10EMA CROSS FROM ABOVE 25 & 50 EMA
EXIT- 25EMA CROSS FROM BELOW 50 EMA
Thanks...


Reply With Quote
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 02:12 PM.

Indemnity, Disclaimer & Disclosure Notice:
By visiting Traderji.com you automatically indicate that you agree to our Forum Rules, Indemnity, Disclaimer & Disclosure Notice and General Content Disclaimer Notice and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum/site.
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. You are recommended to make appropriate enquiries and seek appropriate advise before sending money, incurring any expenses, acting on recommendations or entering into any commitment in relation to any advertisement published here. Traderji.com does not vouch for any claims made by the advertisers of products and services. Traderji.com will not be held liable for any consequences in the event such claims are not honoured by the advertisers. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of any information by anybody mentioned anywhere on this site.
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 or legality of any 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. Although we constantly delete all irrelevant content and/or SPAM, if you should 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 © www.Traderji.com 2001 - , All rights reserved.

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247