MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

Buy Latest Technical Indicators in MetaTrader Market
To post a new code, please log in or register

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2010.11.18 16:31
Doda-Donchian with stop-loss feature

Doda-Donchian with stop-loss feature - indicator for MetaTrader 4

| English Spanish Portuguese

votes: 3


Gopal Krishan Doda


This is the modified version of Donchian channel indicator, popularly known as famous turtle indicator. I've modified it after removing 2 lines. The result is a single line, making a simple but one of the powerful indicator.

Buy: When price closes above Doda-Donchian line

Sell: When price closes below Doda-Donchian line

Stop-loss: Few pips away from Doda-Donchian line.

Works with any currency pair, CFD etc.



  • Use higher time frame like H4. It works best there.
  • It happens many times that price kisses Doda-Donchian line, so it may triggers your stop-loss. So, place your stop loss few pips above / below this line.
  • Even if price moves above or below, that does not make any sense for change of signals. The candle MUST close above / below for confirmation.
Last comments | Go to discussion (15)
gopal krishan doda
gkdoda | 3 Dec 2010 at 15:51

Hello sophiezhang,

Thanks for your positive feedback. For automated trading, the code has to be converted to Expert Advisor. I tried it some time back, but that was not fully successful. I admit I'm not so expert in coding that way. Perhaps, some other expert can do that and share with us.

gopal krishan doda
gkdoda | 8 Dec 2010 at 17:19

The new version of Doda-Donchian has been released on my website

You may download the improved version with more features from there. Please share your feedback.


MQL4 Comments
mql4_comments | 19 Dec 2010 at 05:56

Hello lazim2010,

It's my pleasure and my best wishes for your profitable trading.


as long as I Used it in my account and found out that this indicator is best for down stream signal rather then bound signal.
MQL4 Comments
mql4_comments | 4 Jan 2011 at 14:02

Ok. Understand your problem. Just wait for some time. I'm coding its next version with more features. Will take care of website position in that.


this tool is very much useful for me, especially the newest version, i wait for new version,,

whether these indicators are more suitable for large durations,,

tks shared bro,,

MQL4 Comments
mql4_comments | 17 Jan 2011 at 06:51
Thankyou very much for your help to fellow traders. I want to make one change to this indicator for my use. I want to remove the message on the chart "powered by" as it is on the extreme right of the chart and is making confusion on the chart. Please assist.

ObjectSetText("mywebsite","Powered by", 10, "Arial", Red);

Just Replace with blank space like :

ObjectSetText("mywebsite"," ", 10, "Arial", Red);

I modified the code for my used. Contact me at "" if u need it.

Right now, I have finish my first code on mql4, it is an indicator to show price bid and ask on screen. I have summit it to mql4 side, but it is not listed in there.

can anybody help me.