• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 6:37am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 6:37am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

My Room 5 - MT5 Indicator 182 replies

Indicator for daily percentage move? 0 replies

Pop up alert for indicator main move change 15 replies

indicator lines move when scrolling???? 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 14
Attachments: 'Room to move' indicator
Exit Attachments
Tags: 'Room to move' indicator
Cancel

'Room to move' indicator

  • Last Post
  •  
  • Page 1 23 4
  • Page 1 23 4
  •  
  • Post #1
  • Quote
  • First Post: Edited Oct 6, 2019 1:00am Jan 28, 2016 3:27am | Edited Oct 6, 2019 1:00am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
NOTE: I have left Forex Factory, so don't expect replies to your posts. You can find an index to all my indicators and posts here.

Room Up/Down indicator: Terms and Conditions

 All code is supplied FREE of charge. It may NOT be sold or distributed commercially. Unless otherwise shown, no source code is available.

 Software is offered on an 'as is' basis. I'm not offering a programming or troubleshooting service.

 There is no guarantee that the software is fit for purpose, or free of errors. Download and use the indicator(s) at your own risk; I accept no liability for computer damage or financial losses.
___________________________

Overview

This MT4 indicator operates according to a simple concept. It plots two (sets of) horizontal lines, telling you how far price must move -- up and down -- from the current price, in order for today's range to reach the same number of pips as X% of a N-day ADR. By supplying a series of values for X, you can see how far price is currently away from completing, for example, 50%, 75% or 100% of the average daily range, in both the upward and downward directions. See screenshot below for an illustrated explanation. The plotted levels move dynamically as new daily highs/lows are formed. In the screenshot you can see that, so far today, price has moved around 75% of the ADR, to the upside of the daily low.
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 272.png
Size: 238 KB

In the context of a trading strategy, after price has moved significantly more than 100% of its average daily range for today, you might decide (for example) to no longer open any new positions in that direction, or to close all currently open positions, for that pair, as the probability of price moving too much further is reduced. Or you might decide that price is now overbought or oversold for the day, and start to look for opportunities to trade back the other way.

If you have MT4's 'Show object description' option checked ON -- see the screenshot in post #12 below -- then a description showing the level number (50,75,100 etc) and the price will be plotted above each line. Otherwise, hover the mouse cursor over the line to see this information.

Disclaimer: Download and use at your own risk. All software is provided on an 'as is' basis.


Parameters

string UpLevels = "100";
Enter up to 10 levels, separated by commas. For example, if you want upside levels to be plotted at 50%, 75% and 100% of the ADR, enter 50,75,100

string DownLevels = "100";
Enter up to 10 levels, separated by commas. For example, if you want downside levels to be plotted at 50%, 75% and 100% of the ADR, enter 50,75,100
Or simply type a period (.), to make the DownLevels the same as the UpLevels.

int StartCandle = 0;
Enter the starting candle number where you want the leftmost point of the horizontal line to be plotted. 0 is the rightmost (currently forming) candle of the chart; 1 is the next candle to the left; and so on. You can also enter a negative number to have the line start plotting beyond the right hand edge of the chart.
If you enter 9999, the StartCandle is set to midnight (MT4 time 00:00) of the current day, and locked there until midnight of the next day.

(***new; beta***) string StartTime_hhmm = "0000";
Enter the MT4 time (hhmm) when you want each 24 hour interval ('day') to start. The open/high/low for each 24 hour interval will be calculated from this time. For example, if you enter 0330 then 03:30am MT4 time will be the open time of the 24 hour interval, and the high/low price for the day will be calculated by working forward from this time. This facility allows you to accommodate different broker timezones, or perhaps start your 'day' from the start of the London or New York session. The default value 0000 assumes that you simply want to start each new 'day' at MT4 midnight. Note that on a Monday, prior to your selected Start Time, the indicator simply uses the weekly open as its default starting point, until your Start Time is reached.

int LineLength = 5;
Enter the length of the horizontal line (number of candles to the right of the StartCandle). If you enter a negative number, the line will be extended all of the way to the right axis of the chart (a 'ray').

int ADRdays = 30;
The number of days (N) for the ADR calculation.

color UpLineColor = Gray;
color DownLineColor = Gray;
Colors for the upside and downside lines.

int LineWidth = 1;
Width of the lines (from 1 to 5).

int LineStyle = STYLE_SOLID;
Line style (0=solid, 1=dashed, 2=dotted, 3=dash-dot-dot, 4=dash-dot-dot-dot)

string Visibility = "M1,M5,M15,M30,H1,H4,D1,W1,MN";
Which timeframe charts the lines will be plotted on.

string RefreshPeriod = "M1";
How often the indicator will refresh itself, and the levels will be recalculated and replotted.
T=every tick. M1,M5 etc = the first tick on each M1, M5 etc candle.

bool FixFromOpen = false;
 If false (the default value), the room to move Up/Down is calculated from today's Low/High, which changes throughout the day. This way the indicator works as described in the Overview.
 If true, the room to move Up/Down is calculated from today's Open, and therefore remains fixed for the rest of the day.

string UniqueID = "0";
Creating a different UniqueID for each instance allows you to attach multiple instances of the indicator, with different settings, to the same chart.

bool UseGlobalVariables = false;
 If false (the default value), no output is made to any Global Variables.
 If true, the indicator maintains the values of three Global Variables:
1. RoomUpDown-[Unique ID][symbol ID]-UP = (current bid - today's low) x 100 / ADR, i.e. what percent of the ADR price is currently above today's low (thus far)
2. RoomUpDown-[Unique ID][symbol ID]-DN = (today's high - current bid) x 100 / ADR, i.e. what percent of the ADR price is currently below today's high (thus far)
3. RoomUpDown-[Unique ID][symbol ID]-OP = (current bid - today's open) x 100 / ADR, i.e. what percent of the ADR price is currently above/below (+/-) today's open
Provided that the indicator is attached to any chart, and is maintaining these values, the values can then be accessed by an EA, and used to make trading decisions. Or of course you could simply use the above calculations in your EA instead.

(***new; beta***) string PlotVerticalLine = "White,0,2";
This allows the automatic plotting of a vertical line to show where the new 'day' (the 24 hour interval defined by StartTime_hhmm) begins. To stop the line from plotting, simply leave this parameter setting blank. Otherwise there should be three entries, separated by commas: (1) the Line color (this may be any valid MT4 color token - e.g. SaddleBrown, LightGoldenrod, DodgerBlue - or RnnnGnnnBnnn, where R G B represent the red, green and blue components, and each nnn is a number between 0 and 255); (2) Line width, a value from 0 to 5; (3) Line style, 0=solid line, 1=dashed line, 2=dotted line etc, valid only if Line width<=1.


Installation

This indicator was written/compiled using MT4 build 509. If you want to modify the source (mq4), you must do this first, otherwise it will likely compile with a zillion errors. To avoid this problem, download only the ex4 file.
Or for a build 600+ version, you could try the one very generously contributed by pips4life in post #49.
Attached File(s)
File Type: ex4 RoomUpDown.ex4   38 KB | 970 downloads | Uploaded Jan 24, 2019 1:43am
File Type: mq4 RoomUpDown.mq4   8 KB | 868 downloads | Uploaded Jan 24, 2019 1:43am
  • Post #2
  • Quote
  • Jan 28, 2016 3:32am Jan 28, 2016 3:32am
  •  FerruFx
  • Joined May 2007 | Status: MT4/MT5 EAs/Indicators/Alerts coder | 6,450 Posts
Nice one. Thanks for your great work as usual!
MT4/MT5 EAs/Indicators/Alerts coder
 
 
  • Post #3
  • Quote
  • Jan 28, 2016 4:42am Jan 28, 2016 4:42am
  •  Erebus
  • Joined Jul 2011 | Status: Member | 7,265 Posts
Looks fantastic, the FIB guys will be all over this, well 61.8% of them will be

Don't believe everything that you THINK
BuyDips,SellRips Return This Week: 7.0%
 
 
  • Post #4
  • Quote
  • Jan 28, 2016 4:43am Jan 28, 2016 4:43am
  •  PayTheLimit
  • Joined Aug 2009 | Status: Ride the Pig | 31,178 Posts
nice handy indicator, thanks for your great work, as usual...
Look Sharp/Trade Tight
 
 
  • Post #5
  • Quote
  • Jan 28, 2016 8:28am Jan 28, 2016 8:28am
  •  Thx
  • | Joined Nov 2013 | Status: Mystic | 253 Posts
Thanks a lot ...
I see it all in between ...
 
 
  • Post #6
  • Quote
  • Jan 28, 2016 9:53am Jan 28, 2016 9:53am
  •  priceaction7
  • Joined Oct 2013 | Status: Almost there...... | 182 Posts
Thank you sir
 
 
  • Post #7
  • Quote
  • Jan 28, 2016 11:46am Jan 28, 2016 11:46am
  •  bobzahra
  • | Joined Oct 2013 | Status: Member | 91 Posts
Thank you Hanover
 
 
  • Post #8
  • Quote
  • Jan 28, 2016 12:22pm Jan 28, 2016 12:22pm
  •  mosiskv
  • Joined Mar 2013 | Status: Member | 333 Posts
Handy indicator.

Thanks
Don't limit yourself!!
 
 
  • Post #9
  • Quote
  • Jan 28, 2016 12:29pm Jan 28, 2016 12:29pm
  •  hatemfxg
  • | Joined Jan 2010 | Status: Member | 64 Posts
Thank you and thank you for everything.
 
 
  • Post #10
  • Quote
  • Jan 28, 2016 3:06pm Jan 28, 2016 3:06pm
  •  SoGoNe
  • | Joined Dec 2015 | Status: Member | 10 Posts
thank you for this nice indicator
 
 
  • Post #11
  • Quote
  • Jan 29, 2016 12:38pm Jan 29, 2016 12:38pm
  •  PKOOL
  • | Joined Apr 2007 | Status: Member | 28 Posts
Hi hanover,

Thanks for this, am not getting as it is on your pix, what am i not doing right?
Attached Image (click to enlarge)
Click to Enlarge

Name: roomup.jpg
Size: 125 KB
 
 
  • Post #12
  • Quote
  • Edited 1:33pm Jan 29, 2016 12:48pm | Edited 1:33pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting PKOOL
Disliked
am not getting as it is on your pix, what am i not doing right?
Ignored
Looks perfect to me, assuming you have settings of 50,75,100 for both UpLines and DownLines. See the screenshot in post #1 for the settings (colors etc) that I used. If you want the text to display above the lines, read the third paragraph of post #1, and/or see the screenshot below.

The 'up lines' and the 'down lines' can start to cross over after today's price has significantly exceeded (100% of) the ADR -- which happened with many JPY pairs yesterday after the BoJ unexpectedly introduced a negative interest rate.
Attached Image
 
 
  • Post #13
  • Quote
  • Jan 30, 2016 9:40pm Jan 30, 2016 9:40pm
  •  bobzahra
  • | Joined Oct 2013 | Status: Member | 91 Posts
Dear Hanover'

Could you please add 'unique ID' to your indi so that i can add more than one indicator in one chart.. like 10ADR and 30 ADR setting

Thank you
 
 
  • Post #14
  • Quote
  • Jan 31, 2016 6:35am Jan 31, 2016 6:35am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting bobzahra
Disliked
Could you please add 'unique ID' to your indi so that i can add more than one indicator in one chart.. like 10ADR and 30 ADR setting
Ignored
Not sure why anybody would want to do this, but I've made the change. Download from post #1.
 
 
  • Post #15
  • Quote
  • Jan 31, 2016 9:37am Jan 31, 2016 9:37am
  •  bobzahra
  • | Joined Oct 2013 | Status: Member | 91 Posts
Thank you so much Hanover
 
 
  • Post #16
  • Quote
  • Nov 4, 2016 10:42pm Nov 4, 2016 10:42pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
New parameter FixFromOpen. Updated indy attached to post #1.
 
1
  • Post #17
  • Quote
  • Nov 5, 2016 5:56pm Nov 5, 2016 5:56pm
  •  Rocky007
  • | Joined Jun 2016 | Status: Member | 327 Posts
Thank you!
KRD
 
 
  • Post #18
  • Quote
  • Nov 5, 2016 7:04pm Nov 5, 2016 7:04pm
  •  bobzahra
  • | Joined Oct 2013 | Status: Member | 91 Posts
Thank you so much
 
 
  • Post #19
  • Quote
  • Nov 5, 2016 9:50pm Nov 5, 2016 9:50pm
  •  rajandaas
  • | Joined Jun 2011 | Status: Member | 176 Posts
Hi Hanover,

Thank you so much. You are very generous. May you make a lot of pips
 
 
  • Post #20
  • Quote
  • Nov 6, 2016 6:36am Nov 6, 2016 6:36am
  •  v2vboni
  • Joined Sep 2015 | Status: ob-la-di, ob-la-da, life goes on... | 3,792 Posts
Wow! a golden share
Thanks
Since Frank Sinatra sings in his own way, my chart sing... I did it, my way
 
 
  • Platform Tech
  • /
  • 'Room to move' indicator
  • Reply to Thread
    • Page 1 23 4
    • Page 1 23 4
0 traders viewing now
  • More
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