| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Adding Histogram to a Chart
I was wondering how we can draw histogram on the chart or rather cover the candles with a specific colour. For example I'm trying to cover white candles with the green colour when the white candle is longer than 15 pips. Here is the code I've written and I don't know what's wrong with it. Any ideas?
//+------------------------------------------------------------------+ //| Colour_White.mq4 | //+------------------------------------------------------------------+ #property copyright "Alireza Parsai" #property link "http://www.cadpanel.com" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Green //---- input parameters extern double Span=15.0; //---- buffers double ExtMapBuffer1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_HISTOGRAM, 0, 2, Green); SetIndexBuffer(0,ExtMapBuffer1); //SetIndexDrawBegin(0,10); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- if (counted_bars<0) return(-1); else counted_bars--; int i=Bars-counted_bars; while (i>=0) { double _close, _open, _difference; _close=Close[i]; _open=Open[i]; _difference=_close-_open; if ((_difference>0)&&(_difference>Span*Point)) { ExtMapBuffer1[i]=_open; Comment("Bar Lenght:",ExtMapBuffer1[i]); } else ExtMapBuffer1[i]=0.0; i--; } //---- return(0); } //+------------------------------------------------------------------+ Thanks in advance
__________________
Disclaimer: If you trade my EAs or systems or taking my advice including but not limited to selecting a broker, you are doing so at your own discretion. Forex is a risky business. You may lose substantial amount of money by taking the risk of live trading. I shall not be held responsible for your losses or problems of any kind with the broker. PipBoxer.com / PBHelp.com / ForexBrace.com (Free MQL Training) / GridBoxer.com / Investatech.com |
|
||||
|
Is there anybody out there to help me with this issue.
__________________
Disclaimer: If you trade my EAs or systems or taking my advice including but not limited to selecting a broker, you are doing so at your own discretion. Forex is a risky business. You may lose substantial amount of money by taking the risk of live trading. I shall not be held responsible for your losses or problems of any kind with the broker. PipBoxer.com / PBHelp.com / ForexBrace.com (Free MQL Training) / GridBoxer.com / Investatech.com |
|
||||
|
Quote:
Raff
__________________
http://www.gummy-stuff.org/raff-regression.htm http://www.try-your-luck.com/ Lost in action ;-)... just_raff1410[at]yahoo.com |
|
||||
|
Quote:
if close-open < pips = blue candle if HiLo = true then it repaint canle if high-low > or < pips Raff
__________________
http://www.gummy-stuff.org/raff-regression.htm http://www.try-your-luck.com/ Lost in action ;-)... just_raff1410[at]yahoo.com Last edited by raff1410; 07-07-2006 at 07:51 PM. |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| RSI in Histogram | MIG | Indicators - Metatrader 4 | 54 | 08-04-2008 12:00 PM |
| Adding price to MA on chart | techtrader | Indicators - Metatrader 4 | 0 | 03-06-2007 09:06 PM |
| Adding moving average lines to chart | Aaragorn | Questions | 1 | 07-14-2006 04:41 AM |
| Error adding EA to chart | GoatT | Expert Advisors - Metatrader 4 | 10 | 06-08-2006 12:59 AM |