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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Who can simply and clearly explain trading account types? 25 replies

Running % Gain/Loss on individual trade at top of screen 6 replies

Reading from comments with EA 5 replies

screen comments 3 replies

Reading......and reading....... 21 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 2
Attachments: Clearly reading Comments on Screen when running EA
Exit Attachments

Clearly reading Comments on Screen when running EA

  • Post #1
  • Quote
  • First Post: Aug 1, 2015 10:09pm Aug 1, 2015 10:09pm
  •  Chorlton
  • | Joined Jul 2010 | Status: Member | 211 Posts
Hello All,

I have added a large number of comments which are located on the lefthand side of the chart which I refer back to when running my EA. These comments lines take up approx. 2/3rds of the height & 1/5th the width of my chart. This is fine as I only need to see the price bars on the righthand side of the chart.

The problem, however, is that as the price bars move across the screen I am unable to clearly read these comments.

I am using a white background with black comments and black price bars.

Is there anyway I can also "white out" the chart is this area, or use a white fill behind the text, etc, etc so my comments remain clearly visible at all times?


Thanks in advance,

Chorlton
  • Post #2
  • Quote
  • Aug 1, 2015 11:24pm Aug 1, 2015 11:24pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Hi,
Try this (it is a script)
Once you find the settings that suit you you can change the defaults in the editor
If you no longer want it on the chart, open the objects list and delete it
Attached File
File Type: mq4 Hide.mq4   2 KB | 146 downloads
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #3
  • Quote
  • Aug 1, 2015 11:52pm Aug 1, 2015 11:52pm
  •  cja
  • Joined Feb 2007 | Status: Member | 1,837 Posts
This is an indicator and you can set the input "Use Auto Background color = true " which means it will automatically pick up the chart background colour or you have the option to set the input "Use Auto Background color = false " and use any colour you want. The chart candles must be set to the Background setting or they will appear on top of the Background.
Attached File
File Type: ex4 Comment Background.ex4   32 KB | 158 downloads
Trade what you see not what you hope
 
 
  • Post #4
  • Quote
  • Aug 2, 2015 3:06am Aug 2, 2015 3:06am
  •  Chorlton
  • | Joined Jul 2010 | Status: Member | 211 Posts
Quoting Gumrai
Disliked
Hi, Try this (it is a script) Once you find the settings that suit you you can change the defaults in the editor If you no longer want it on the chart, open the objects list and delete it {file}
Ignored
Hi GumRai,

Appreciate the help.

I'd like to incorporate this into my EA rather than run a script separately.

With this in mind I have created a function using your code and have tried to call it from within OnInit() function with no luck.

If I move it to within the section OnTick() it now works but it runs the function on each tick which uses unnecessary resources IMO. I had the idea to leave it there but place it in a loop which only runs once. Is this how you would tackle this problem or would you have a better approach??

Thanks in advance,
 
 
  • Post #5
  • Quote
  • Aug 2, 2015 3:06am Aug 2, 2015 3:06am
  •  Chorlton
  • | Joined Jul 2010 | Status: Member | 211 Posts
Quoting cja
Disliked
This is an indicator and you can set the input "Use Auto Background color = true " which means it will automatically pick up the chart background colour or you have the option to set the input "Use Auto Background color = false " and use any colour you want. The chart candles must be set to the Background setting or they will appear on top of the Background. {file}
Ignored
Thanks cja,

I'll take a look.... thanks for the reply...
 
 
  • Post #6
  • Quote
  • Aug 2, 2015 3:42am Aug 2, 2015 3:42am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting Chorlton
Disliked
{quote} Hi GumRai, Appreciate the help. I'd like to incorporate this into my EA rather than run a script separately. With this in mind I have created a function using your code and have tried to call it from within OnInit() function with no luck. If I move it to within the section OnTick() it now works but it runs the function on each tick which uses unnecessary resources IMO. I had the idea to leave it there but place it in a loop which only runs once. Is this how you would tackle this problem or would you have a better approach?? Thanks in advance,...
Ignored
It should be simple to do
Put this with the inputs (or extern, whichever you use)
Inserted Code
//--- input parameters
input int      x=0;//X co-ordinate
input int      y=15;//Y co-ordinate
input int      width=200;//Width in pixels
input int      height=400;//Height in pixels
input color    back_clr=clrWhite;//Background Colour
string Name="RLHide";

Then this in init

Inserted Code
   ObjectCreate(0,Name,OBJ_RECTANGLE_LABEL,0,0,0);
   ObjectSetInteger(0,Name,OBJPROP_XDISTANCE,x);
   ObjectSetInteger(0,Name,OBJPROP_YDISTANCE,y);
   ObjectSetInteger(0,Name,OBJPROP_XSIZE,width);
   ObjectSetInteger(0,Name,OBJPROP_YSIZE,height);
   ObjectSetInteger(0,Name,OBJPROP_BGCOLOR,back_clr);
   ObjectSetInteger(0,Name,OBJPROP_BACK,false);
   ObjectSetInteger(0,Name,OBJPROP_CORNER,0);
   ObjectSetInteger(0,Name,OBJPROP_BORDER_TYPE,BORDER_FLAT);
   ObjectSetInteger(0,Name,OBJPROP_COLOR,back_clr);
   ObjectSetInteger(0,Name,OBJPROP_HIDDEN,false);

Then in Deinit

Inserted Code
ObjectDelete(Name);

That should work for you.
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #7
  • Quote
  • Aug 2, 2015 3:52am Aug 2, 2015 3:52am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Sorry, my previous reply was corrupted, so I have edited it to make it readable
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #8
  • Quote
  • Aug 2, 2015 4:34am Aug 2, 2015 4:34am
  •  Chorlton
  • | Joined Jul 2010 | Status: Member | 211 Posts
Quoting Gumrai
Disliked
Sorry, my previous reply was corrupted, so I have edited it to make it readable
Ignored

I tried to do this but for some reason the white box just didn't seem to appear.

I did find an alternative solution though. I created a function (as per your code) and then called it within the OnTick function. However I added a check to ensure that the code only gets called once. So far it seems to be working

As always, Thanks for your advice..... its definitely helping with my knowledge....
 
 
  • Post #9
  • Quote
  • Last Post: Aug 2, 2015 6:05am Aug 2, 2015 6:05am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting Chorlton
Disliked
{quote} I tried to do this but for some reason the white box just didn't seem to appear. I did find an alternative solution though. I created a function (as per your code) and then called it within the OnTick function. However I added a check to ensure that the code only gets called once. So far it seems to be working As always, Thanks for your advice..... its definitely helping with my knowledge....
Ignored
Well, the important thing is that it works
Please Do Not PM Me With Coding Enquiries
 
 
  • Platform Tech
  • /
  • Clearly reading Comments on Screen when running EA
  • 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