Entry Issue with Donchian Channel
|
|||
|
My entry technique: I intend to enter long or short when the current price bar closes above or below a Donchian Channel (50 day market high or low)
...... double DonchianLowerEntry = iCustom(NULL,0,"DonchianChannel2",2400,3,-2,0,100,0,0); // Entry for Lower Donchian Channel - 50 days, 2400 double DonchianUpperEntry = iCustom(NULL,0,"DonchianChannel2",2400,3,-2,0,100,1,0); // Entry for Upper Donchian Channel - 50 days, 2400 double ClosingPrice = iClose(NULL,0,0); //Closing Price of current bar ...... if(ClosingPrice>DonchianUpperEntry) // Closing price is greater than the Donchian upper channel { if(trend>0) // Trend is up - MACD indicator filter { ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-TrailingStop,0,"Alcatraz: Long Order Placed",16384,0,Green); // Open Long order ..... Expert Advisor is opening a trade when bar penetrates Donchian Channel, but does not close above the Channel. It should be opening trade only when it CLOSES above the channel. Does anyone know why this might be happening? |
![]() |
|
||||
|
if(ClosingPrice>DonchianUpperEntry)
The ClosingPrice should be for bar 1 and not bar 0 (current tick) I guess thats what causing the error ...
__________________
F r e e___F o r e x___E b o o k s___a n d___S t u f f s ![]() -> Cheap MQL Coding service for your EA/indicator is Here <- <- |
| The following users have thanked bossxero for useful post above: | ||
|
|||
|
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!! More info here Coding services: Experts Advisors, indicators, alerts, etc ... NEW: TripleXXX Expert Advisor developed by Spiritfriends and coded by FerruFx ... more info |
no connection on my metatrader terminal
|
|||
|
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!! More info here Coding services: Experts Advisors, indicators, alerts, etc ... NEW: TripleXXX Expert Advisor developed by Spiritfriends and coded by FerruFx ... more info |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple Entry EA | Tribulus | Trading Systems | 0 | 05-25-2008 02:57 AM |
| timeframe calculating issue | Libros | MetaTrader and ZeroCode | 1 | 08-03-2007 08:25 AM |
| 'Dynamic' Shi Channel | fleshmorph | Indicators | 1 | 12-15-2006 02:43 AM |
| Historical data issue | Damir1105 | General Trading Talk | 1 | 10-26-2006 01:33 AM |
| Double entry rules | TraderSeven | MetaTrader and ZeroCode | 5 | 06-23-2005 05:54 AM |
All times are GMT. The time now is 12:18 PM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now










F r e e___F o r e x___E b o o k s___a n d___S t u f f s 

.cant you tell me why trading terminal metatrader disconnect..what is problem it?
Linear Mode


