• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 6:35am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 6:35am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Indicator window background colour 25 replies

M Candle is drawing over MT4 candles - Help put in background 0 replies

Background color change as indicator changes up/down 3 replies

Drawing Objects vs Drawing lines 1 reply

Custom Indicator not Drawing Properly? 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 1
Attachments: drawing an indicator in the background?
Exit Attachments

drawing an indicator in the background?

  • Post #1
  • Quote
  • First Post: Nov 5, 2011 6:24am Nov 5, 2011 6:24am
  •  cuby1
  • | Joined Oct 2009 | Status: Member | 71 Posts
(1st, must thank the moderator letting me post a new thread...pleasant surprise)
I would like to draw an Indi. that draws Histogram lines to shadow an area (see the pic att.)
the problem is that I can't move it, or program it to background, as is done with Objects.
any idea how to resolve it, will be mostly welcome ;-)
Attached Image (click to enlarge)
Click to Enlarge

Name: indicator overshadows screen lines and Bid.jpg
Size: 318 KB
  • Post #2
  • Quote
  • Nov 5, 2011 6:35am Nov 5, 2011 6:35am
  •  CodeMeister
  • Joined Sep 2009 | Status: Making Code While Making Pips | 1,672 Posts
If you wrote your indicator in MQL5, I believe you could achieve what you want to do unless I misunderstand the documentation.

It might be possible in MQL4, but I don't know how to do it.
 
 
  • Post #3
  • Quote
  • Nov 5, 2011 7:13am Nov 5, 2011 7:13am
  •  nubcake
  • Joined Oct 2009 | Status: >Apocalypto< for Deputy PM | 3,698 Posts
the way i would do it is similar to the way i draw candles in sub-windows...

you will need layers of histo buffer pairs on your main chart.

pair 1. background shading from lower bound to upper bound as per your specs.
pair 2. width of 1 wick color for both upper and lower wick
pair 3. width of 3 or 5 (whichever looks right, which i think is 3) bull color body
last available, pair 4. similar to 3 except bear color body.

with this you are creating your outward shading as per your question, but this inevitably overdraws the chart candles, so then you plot a long wick from low to high on top of your background, and then finally you plot a bull colored histo over the long wick for the open to close / bear colored histo over the long wick for the open to close. whichever bull / bear pair is not relevant you simply set to zero zero and therefore does not show.

you won't get the smooth appearance that your image has for the shaded area, but you'll get something close.

\o/
Forex Trading for the Savvy Beginner
 
 
  • Post #4
  • Quote
  • Last Post: Nov 5, 2011 9:57am Nov 5, 2011 9:57am
  •  cuby1
  • | Joined Oct 2009 | Status: Member | 71 Posts
someone offered to redraw the Bid and other lines by another indicator as objects that will cover my indicator. it's a nice Idea but lack of spark...

thanks CodeMeister and nubcake, so far you gave me the best profesional view, and summing up I m comming to conclusion that MQ4 is missing such option.
I wonder if it can be done by other ways, that dosnt overload the system (anyone that knows machine language that might alter the basic flags of the indicator...I would really eagger to have such a solution)
thanks, pals
 
 
  • Platform Tech
  • /
  • drawing an indicator in the background?
  • Reply to Thread
0 traders viewing now
Top of Page
Forex Factory Blog Updated: Alerting All Members
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022