Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   Display Info indicator (https://www.forexfactory.com/showthread.php?t=245064)

hanover Jul 9, 2010 2:24am | Post# 1

8 Attachment(s)
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.

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.
___________________________

Display Info All Pairs indicator

This indicator will display the following info, for all currency pairs offered by your br0ker:

-- Symbol (A=AUD, C=CAD, E=EUR, F=CHF, G=GBP, J=JPY, N=NZD, U=USD)
-- Current bid price
-- Daily move from open, both as pips, and a % of the daily open price
-- Daily range to date:ave daily range (DR as a % of ADR) (note: Sunday candles not included in ADR)
-- Spread (spread as a % of ADR)
-- Dollars per pip (per full lot traded)
-- Swap paid(+) or charged(-) by br0ker on long and short positions

The indy produces the table in the lower right of the attached screenshot.Click to Enlarge

Name: Display Info indy.jpg
Size: 181 KB

Note: if you set FullSymbolIDs = TRUE, then you'll need to set at least one of the other Show........ parameters to FALSE, to avoid truncation. MT4 allows a maximum of 62 characters in a text object's description.
Display Info All Pairs.mq4
This indicator has been updated. You can download the latest version here (both build509 and build600+ versions are available), or in the ZIP file attached to this post (#1).

___________________________

Critical Levels indicator

This indy displays colored lines at the RHS of your chart. You can select lines from any or all of the following:
--- prior daily, weekly and monthly highs/lows;
--- daily, weekly and monthly pivot levels (standard calculation)
--- daily, weekly and monthly pivot levels (fibo based calculation)
--- round numbers (xx00 and xx50)

See the screenshot below for an example.Click to Enlarge

Name: 2012-12-19_1630_001.png
Size: 86 KB

If you want a certain line type to display, select your desired color; it must be a valid MT4 color token, e.g. Red, SaddleBrown, Goldenrod, MediumViolet. If not, leave the parameter blank.

The indy will work if you simply copy the .ex4 file into your ..../experts/indicators folder. However, if you copy the .mq4 file there also, then you must also copy the two .mqh files here into your ..../experts/include folder, for the .mq4 to compile correctly. (Only a build509 version is currently available).Critical Levels.ex4Critical Levels.mq4
___________________________

Output History indicator & script

Either one of these will output OHLCV history to CSV files, simultaneously for up to 40 pairs/instruments, and 9 timeframes, allowing easy import to Excel. A separate file is created for each pair/timeframe combination. The script runs the job once; while the indicator runs it once every time a new price tick occurs, overwriting the relevant file(s).

Each bar in the chart occupies one line (row) in the file. Data in each row is output in the following order: date/time, open, high, low, close, volume

You can easily modify the source code to add additional values from MT4 indicators, by using MQL4 functions (e.g. iMA, iRSI, iBands, iCustom, etc).


INSTALLATION:

Copy the two .mqh files here into your ..../experts/include folder.
Copy the .mq4 (indicator) file into your ..../experts/indicators folder.
Copy the .mq4 (script) file into your ..../experts/scripts folder.
Then restart MT4.
(NOTE: Currently, only build509 versions are available).

PARAMETERS:

CurrencyPairs: leave blank to output only for the pair on whose chart the script/indicator is attached. Otherwise type in up to 40 pairs, separated by commas. Upper or lowercase doesn’t matter, and you may use the following abbreviations: A=AUD, C=CAD, F=CHF, E=EUR, G=GBP, J=JPY, N=NZD, U=USD. Hence you could type something like: EU,GU,UF,UJ which works the same as EURUSD,GBPUSD,USDCHF,USDJPY

TimeFrames: leave blank to output only for the timeframe on whose chart the script/indicator is attached. Otherwise type in up to 9 timeframes, separated by commas. Upper or lowercase doesn’t matter. For example, to output for all 9 timeframes, copy this:
M1,M5,M15,M30,H1,H4,D1,W1,MN

Hence the above entries would create 36 different files (4 pairs x 9 timeframes).

DifferentSubfolderPerTimeFrame: if set to FALSE, all files will be output to your …/experts/files folder. If set to TRUE, subfolders will automatically be created under this folder, e.g. …/experts/fiels/H1, and the output file(s) will be created in the subfolders.

Regardless of the folder, all files are named: [pair],[timeframe].CSV

LookbackBars: OHLCV values for the most recent (rightmost) ‘n’ bars will be output, where ‘n’ is the value you type here. If you specify either 0, or a very large number (e.g. 999999), then all values for all bars in the chart history will be output. WARNING: if using the indicator, then outputting a very large amount of data repeatedly on every price tick may bring MT4 to a standstill.

DescendingDateTimeOrder: if set to FALSE, data is output in chronological order, i.e. earliest bar values at the start of the file. If set to TRUE, data is output in reverse chronological order, i.e. most recent bar values at the start of the file.

OutputHeaderLine: if set to TRUE, it will output one line (row), with column headings, at the start of the file. If set to FALSE, no header line will be output.

FieldSeparator: set this to the delimiter character(s) you wish to appear between column vales that are outputs. Default is a comma (,).

EncloseValuesInQuotes: if set to TRUE, each data value will be enclosed in double quotes, e.g. “1.3659”.

DateTimeFormat, PriceFormat, etc: these are explained here.
Note that date and time, by default, are output as one field. If you want them to appear as separate fields, you must include a field separator (and quotes, if desired) inside the DateTimeFormat, e.g. M/D/Y","H:I


SAMPLE OUTPUT:
Inserted Code
Date,Time,Open,High,Low,Close,Volume
"12/21/2012","04:00","87.970","87.984","87.584","87.804","18961"
"12/21/2012","08:00","87.803","87.965","87.582","87.609","15917"
"12/21/2012","12:00","87.607","87.847","87.560","87.603","12136"
"12/21/2012","16:00","87.602","87.871","87.530","87.686","18678"
"12/21/2012","20:00","87.686","87.724","87.538","87.599","7838"
"12/24/2012","00:00","87.707","87.870","87.652","87.734","9248"
"12/24/2012","04:00","87.736","87.818","87.687","87.813","4924"
"12/24/2012","08:00","87.810","87.915","87.780","87.811","5634"
"12/24/2012","12:00","87.812","87.891","87.741","87.811","6903"
"12/24/2012","16:00","87.811","87.994","87.793","87.938","5883"
"12/26/2012","01:00","88.053","88.412","88.006","88.348","13701"
"12/26/2012","05:00","88.348","88.476","88.308","88.398","7351"
"12/26/2012","09:00","88.398","88.608","88.347","88.433","10198"
"12/26/2012","13:00","88.433","88.642","88.350","88.576","10997"
"12/26/2012","17:00","88.576","88.770","88.427","88.766","12260"
"12/26/2012","21:00","88.766","88.842","88.715","88.837","4481"
"12/27/2012","00:00","88.833","88.886","88.620","88.832","10180"
"12/27/2012","04:00","88.835","88.948","88.755","88.803","10334"
"12/27/2012","08:00","88.803","88.970","88.765","88.945","9994"
"12/27/2012","12:00","88.944","89.119","88.902","89.065","9441"
Output History (indicator).mq4Output History (script).mq4
___________________________

Download Central Bank rates
(new: Nov 17,2018)

This executable app will download the bank OCR rates from this webpage for any currency/ies that you specify. A separate CSV file named cbrate_<country>.csv, showing the date and rate changes in chronological order, will be created for each bank, in the folder where the app is installed. The format of each file looks like this:
Inserted Code
2001.01.03,6.00
2001.01.31,5.50
2001.03.20,5.00
2001.04.18,4.50
2001.05.15,4.00
2001.06.01,3.75
2001.08.21,3.50
2001.09.17,3.00
2001.10.02,2.50
2001.11.06,2.00
2001.12.11,1.75
2002.06.25,1.00
2002.11.06,1.25
2003.06.25,1.00
2004.06.30,1.25

Simply unzip the attached file to obtain the EXE file, which you can install and run from any folder that you wish (including your desktop).CB_rates Downloader.zip
The app was written using Autohotkey, and no source code is available.

Oksana17 Jul 17, 2010 5:30pm | Post# 2

Thank you !
I will now use it for my manual trading.

mer071898 Sep 14, 2010 9:26pm | Post# 3

Can this be configured to show the swap rates only?

hanover Sep 15, 2010 4:32pm | Post# 4

Can this be configured to show the swap rates only?
Done. I've updated the version attached to post #1.

destroyer74 Dec 19, 2010 1:07pm | Post# 5

Thank you for this useful indicator, Hanover!
But can you attach .mq4 file?

hanover Dec 21, 2010 12:39pm | Post# 6

But can you attach .mq4 file?
Source code was posted here.

umpats Aug 1, 2011 1:55am | Post# 7

CCI angle indicator
 
Source code was posted here.

Hello Hanover,

If possible then please help me to give a indicator of cci(14).

the condition is like when the cci(14) angle is between 12 to 2 then up arrow and
when the cci(14) angle is between 4 to 6 then down arrow and all other condition is side ways arrow.

this indicator i require for 4H, 1H and 15M timeframe together.

thanks in advance.

Umpats

hanover Aug 1, 2011 3:37am | Post# 8

Hello Hanover,

If possible then please help me to give a indicator of cci(14).

the condition is like when the cci(14) angle is between 12 to 2 then up arrow and
when the cci(14) angle is between 4 to 6 then down arrow and all other condition is side ways arrow.

this indicator i require for 4H, 1H and 15M timeframe together.

thanks in advance.

Umpats
I don't believe it's possible to determine the angle of an indicator. Two reasons:

1. An indicator tends to plot a curve (not a straight line). The angle of a curve, across multiple points, is constantly changing.

2. As you zoom in or out, changing the horizontal scale, the angle between any two points on the curve changes.

To obtain a mathematical formula that could be coded, you'd need to specify what change in CCI over a specific number of candles constitutes bullish, bearish or neutral condition.

umpats Aug 8, 2011 2:19am | Post# 9

I don't believe it's possible to determine the angle of an indicator. Two reasons:

1. An indicator tends to plot a curve (not a straight line). The angle of a curve, across multiple points, is constantly changing.

2. As you zoom in or out, changing the horizontal scale, the angle between any two points on the curve changes.

To obtain a mathematical formula that could be coded, you'd need to specify what change in CCI over a specific number of candles constitutes bullish, bearish or neutral condition.

Thank you Hanover for your reply.

But is it possible to make a EA when cci (50) above or below 0 line and price is above or below EMA(34) then open or close order.

thanks in advance.

umpats

hanover Jan 18, 2012 1:53am | Post# 10

Simple P/L indicator
 
1 Attachment(s)
As per PM request
Display PL.mq4

JeremyWS Jan 18, 2012 2:52am | Post# 11

Are swap rates expressed as a dollar amount per full lot or as pips?

Great indicator by the way.

Thanks

hanover Jan 18, 2012 2:03pm | Post# 12

Are swap rates expressed as a dollar amount per full lot or as pips?

Great indicator by the way.

Thanks
Dollar amount (or whatever currency your account is denominated in) per full lot traded.

PPKpe Feb 22, 2012 2:43pm | Post# 13

display info of rectangle
 
Dollar amount (or whatever currency your account is denominated in) per full lot traded.
Hi Hanover,

After doble click on the corner of the rectangle drawing in my metatrader and drag the handles, I can see the # of candles and the # of pips. I would like the rectangle show the value "# of pips / # of candles". It could be named by speed "speed=# of pips/ # of candles"... Could you help please, how to display that info??

Thanks in advance,
Ppkpe

hanover Feb 23, 2012 1:05am | Post# 14

Hi Hanover,

After doble click on the corner of the rectangle drawing in my metatrader and drag the handles, I can see the # of candles and the # of pips. I would like the rectangle show the value "# of pips / # of candles". It could be named by speed "speed=# of pips/ # of candles"... Could you help please, how to display that info??

Thanks in advance,
Ppkpe
Hi,

It took me a while to realize that your question has nothing to do with the indicator that's the subject of this thread.

However, no problem. The answer to your question is that the info that's being displayed can not be modified or added to. You would need to create an additional text or label object that displays the text that you require. Something like:

Inserted Code
  string boxname = "box1";
  int      c1  = iBarShift(Symbol(),Period(),ObjectGet(boxname,OBJPROP_TIME1));
  int      c2  = iBarShift(Symbol(),Period(),ObjectGet(boxname,OBJPROP_TIME2));
  double   p1  = ObjectGet(boxname,OBJPROP_PRICE1);
  double   p2  = ObjectGet(boxname,OBJPROP_PRICE2);
  color    clr = ObjectGet(boxname,OBJPROP_COLOR);
  if (c1==c2)
    double speed = 0;
  else   
    speed = (p2-p1)/Point / (c2-c1);
  string   objname = "text1";
  string   objtext = "speed=" + DoubleToStr(speed,1);
  if (ObjectFind(objname) < 0)  {
    ObjectCreate(objname,OBJ_TEXT,0,Time[c2],p2-100*Point);
    ObjectSetText(objname,objtext,12,"Arial",clr);
  }
The above assumes that an object with the name "box1" already exists, and it will calculate and display the speed value, as a separate text object (named "text1").

David

PPKpe Feb 23, 2012 6:41pm | Post# 15

Hi,

It took me a while to realize that your question has nothing to do with the indicator that's the subject of this thread.

However, no problem. The answer to your question is that the info that's being displayed can not be modified or added to. You would need to create an additional text or label object that displays the text that you require. Something like:

[code] string boxname = "box1";
int c1 = iBarShift(Symbol(),Period(),ObjectGet(boxname,OBJPROP_TIME1));
int c2 = iBarShift(Symbol(),Period(),ObjectGet(boxname,OBJPROP_TIME2));...

Hi David,
Thank very much to answer my email.
I will try to make the "box1".
Best regards,
Ppkpe

hanover Feb 25, 2012 1:15am | Post# 16

PPK trendlines indicator
 
1 Attachment(s)
Hi David,
Thank very much to answer my email.
I will try to make the "box1".
Best regards,
Ppkpe
Hi,

The attached indicator represents my response to your PM.

I'm too busy to take on new programming work, but this job took less than 10 minutes, hence I made an exception.

All of the trendlines that you want annotated must be the same color as the color that you specify. That makes it possible to have non-annotated trendlines on your chart, also.

The indicator must be refreshed manually, as I consider it inefficient to have it re-plot the text annotations on every new price tick.

I don't mind responding to posts on the thread topic (the Display Info indicator), but in future I won't be replying to anybody who requests other work here. After 5 years of contributing freely to Forex Factory, I now owe it to myself to focus on automating my own strategies.

David
PPK trendlines.mq4

devisen Apr 14, 2012 10:06am | Post# 17

Visual Order Pro Lot size?
 
Hello,

i Like this tool, its very helpful in short Timeframes like M1,
but the risk with 2 lots is to high for my budget,
how can i change to 1, 0.50, 0.30, ...
Thanks !

hanover Apr 14, 2012 3:35pm | Post# 18

Hello,

i Like this tool, its very helpful in short Timeframes like M1,
but the risk with 2 lots is to high for my budget,
how can i change to 1, 0.50, 0.30, ...
Thanks !
I have posted the answer here.

Terraforce1 Jul 24, 2012 9:57am | Post# 19

Hi Hanover

Thanks for the indicator. Do you perhaps have a decent tried and tested EMA crossover EA? I found a few on some of the other forums that I tried to tweak myself but to no avail. So with your great knowledge I was hoping you have coded an EA for an EMA crossover that eill actually work.

Thanks

hanover Jul 25, 2012 7:52am | Post# 20

Hi Hanover

Thanks for the indicator. Do you perhaps have a decent tried and tested EMA crossover EA? I found a few on some of the other forums that I tried to tweak myself but to no avail. So with your great knowledge I was hoping you have coded an EA for an EMA crossover that eill actually work.

Thanks
Hi,

No, sorry, I don't have an EA whose trading rules involve a MA crossover.

Have you tried searching all of the threads started by Steve Hopwood and Ronald Raygun? They have written many more EAs than I have.

Good luck,
David


© Forex Factory