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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

indicator to toggle all currency symbol in mt4? 1 reply

Difference between normal indicator and custom indicator 3 replies

Is this even possible in MQ4? (Capslock Toggle) 14 replies

Custom indicator to switch timeframe and add indicator 3 replies

Run scripts and toggle EAs with quick buttons 1 reply

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 2
Attachments: Toggle custom indicator on and off
Exit Attachments
Tags: Toggle custom indicator on and off
Cancel

Toggle custom indicator on and off

  • Post #1
  • Quote
  • First Post: Mar 17, 2010 7:04am Mar 17, 2010 7:04am
  •  Royston
  • | Joined Nov 2008 | Status: Member | 280 Posts
Is MT4 capable of allowing a Custom Indicator to be toggled on and off, via a script?

I am thinking of something parallel to the Trade Naked script,
http://www.forexfactory.com/showthread.php?t=37270,
which hides all objects on the chart, toggling them on and off via a hot key. But in my case, it would toggle on and off only a single Custom Indicator, say CustomCandle6 for example.
  • Post #2
  • Quote
  • May 1, 2012 6:32am May 1, 2012 6:32am
  •  supremeChaos
  • Joined Feb 2009 | Status: Borderline yahoo & oh-no! | 6,607 Posts
i've been curious if this is possible?
toggling a custom indicator via a hotkey or script?

example, toggling an MA on/off the chart.
can this be done using a generic piece of code? (i'd like to learn and see the .mq4)

Thank you!
 
 
  • Post #3
  • Quote
  • May 1, 2012 6:54am May 1, 2012 6:54am
  •  Okane
  • | Joined Jan 2011 | Status: Member | 18 Posts
Just an idea... One way of doing this would be to use a global variable. You would have a script that would toggle a global variable to "show" or "hide". Change your indicator to display itself only if the global variable is "show" and to not display if the global variable is "hide". My quick idea is something like this:-

Script code
-----------
if(GlobalVariableGet("DisplayIndi"(==true)
GlobalVariableSet("DisplayIndi",false);
if(GlobalVariableGet("DisplayIndi")==false)
GlobalVariableSet("DisplayIndi",true);

Indicator code
-------------
if(GlobalVariableGet("DisplayIndi")==false)
SetIndexStyle(3, DRAW_NONE, EMPTY, EMPTY, CLR_NONE);
 
1
  • Post #4
  • Quote
  • May 1, 2012 7:10am May 1, 2012 7:10am
  •  supremeChaos
  • Joined Feb 2009 | Status: Borderline yahoo & oh-no! | 6,607 Posts
i see. so it seems possible, whether as script or indicator, using GV.
Thanks Sir Okane, terima kasih
 
 
  • Post #5
  • Quote
  • May 1, 2012 7:34am May 1, 2012 7:34am
  •  CockeyedCowboy
  • Joined Apr 2006 | Status: Trader Keit | 286 Posts
Royston

what your asking can be done and more, but you have to have the knowledge of how MT runs and programing in general. In the screen shots attatched you can see that not only can the charts be removed but changed, and I have taken it a step ferther by having groups indicator which I call iPack files.

the names of the lower window shown (to the very right of each window) is the indicator group, the indicator in view is shown with a watermark behine the indicator.

these groups are controled with the icons located next to the trade window (currently showing no trading) you can turn on and off any groupe or combiation of them, the indicator in the iPack files are controled with the iCons located under the cycle chart in the center of the screen. The names that are shown to the right of the cycle chart are iCons to control how and what the cycle chart will show.

So what your asking can be done and a lot more but it a very complicated coding task.

Keit


There are 4 screen shots combined in this picture,





Quoting Royston
Disliked
Is MT4 capable of allowing a Custom Indicator to be toggled on and off, via a script?

I am thinking of something parallel to the Trade Naked script,
http://www.forexfactory.com/showthread.php?t=37270,
which hides all objects on the chart, toggling them on and off via a hot key. But in my case, it would toggle on and off only a single Custom Indicator, say CustomCandle6 for example.
Ignored
Attached Image (click to enlarge)
Click to Enlarge

Name: VIEW INDICATORS.jpg
Size: 154 KB
Trader Keit ... Methods Of A Dirt Road Mad Man....
 
 
  • Post #6
  • Quote
  • May 1, 2012 8:02am May 1, 2012 8:02am
  •  CockeyedCowboy
  • Joined Apr 2006 | Status: Trader Keit | 286 Posts
Royston

I though I throw this in to;

The menu that appears to the left is also a hot spot on the chart if you mouse click on one, it will pop up a ledger sheet with some information on it. this one is the lot sizing. note that it has long and short lot sizing be cause the program knows market direction, so if you place an order it will do so with the correct lot size base on if your following the trend or conter trend trading.

to place an order all one has to to is to drag and drop an iCon that is now in view in the trade window, once a trade is place other options will appear in the trade window to manage you trades by other iCons. Some stop capibilities are automaticly set after an order is place but the user can add other capabilities too with other iCons that will appear after an order is placed,

The other areas that are hi lighted are hot spots on the chart The crayon trend lines are there the little red box is a hot spot, alot of my graphics are stationary and only get drawn once and never revisted, if the graphics get accidently deleted or moved out of place, all I have to to is mouse over that little red range box and the graphic get redrawn or placed back in there right full place,

The prompt zone is a trading hot spot area were the executor either takes information from or pleaces information to. Its to control and or manage orders

I can even change all indicator parameters right on the chart in real time with out visiting the indicator dilalog box.

theres a lot more;

Keit
Attached Image (click to enlarge)
Click to Enlarge

Name: risk management.jpg
Size: 64 KB
Trader Keit ... Methods Of A Dirt Road Mad Man....
 
 
  • Post #7
  • Quote
  • May 1, 2012 9:51am May 1, 2012 9:51am
  •  supremeChaos
  • Joined Feb 2009 | Status: Borderline yahoo & oh-no! | 6,607 Posts
fascinating work, Sir Keit.
is this MT4/MQL4? it seems something else?
how CPU-intensive is it?
 
 
  • Post #8
  • Quote
  • May 1, 2012 5:20pm May 1, 2012 5:20pm
  •  CockeyedCowboy
  • Joined Apr 2006 | Status: Trader Keit | 286 Posts
SC

answered your PM.

Its all MT4, I reconstructed the chart window to show what and were I wanted things. its all coded in mq4.

Keit



Quoting supremeChaos
Disliked
fascinating work, Sir Keit.
is this MT4/MQL4? it seems something else?
how CPU-intensive is it?
Ignored
Trader Keit ... Methods Of A Dirt Road Mad Man....
 
 
  • Post #9
  • Quote
  • Last Post: Jan 19, 2015 7:23pm Jan 19, 2015 7:23pm
  •  unclezoot
  • | Joined Jun 2013 | Status: Member | 45 Posts
I see it's possible to toggle your indicators on/off by setting a GlobalVariable to true/false a script.
However, once deactivated you still have to change the TF for the change to get reflected on screen.
Is there a way to force the screen to update and hide the indicator via the GlobalVariable method all in one go?

Thanks anyone!
 
 
  • Platform Tech
  • /
  • Toggle custom indicator on and off
  • Reply to Thread
0 traders viewing now
Top of Page
  • 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 / ©2023