• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 4:24pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 4:24pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

4 Digit & 5 Digit Brokers 11 replies

Adjusting an EA from 4 digit to 5 digit broker 56 replies

migrating from 4-digit to 5-digit broker. help! 0 replies

5 Digit price in 4 digit broker backtest 0 replies

Detecting 4 digit vs 5 digit broker 2 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 6
Attachments: modify to show 4 digit bid price instead of 5
Exit Attachments
Tags: modify to show 4 digit bid price instead of 5
Cancel

modify to show 4 digit bid price instead of 5

  • Post #1
  • Quote
  • First Post: Jun 26, 2012 8:46am Jun 26, 2012 8:46am
  •  dns_di
  • | Joined Jun 2011 | Status: Member | 97 Posts
Hi guys,

can somebody modify this indi so it shows 4 digits not 5?

And yes feel free to use it
Attached File(s)
File Type: mq4 Magnified Market Price.mq4   1 KB | 313 downloads
  • Post #2
  • Quote
  • Jun 26, 2012 10:22am Jun 26, 2012 10:22am
  •  Shabs19
  • Joined Aug 2006 | Status: Member | 4,406 Posts | Online Now
There is a free download here:

http://www.metatraderexpertadvisors.com/
"The Only Limit, is the One that you Set Yourself"
 
 
  • Post #3
  • Quote
  • Jun 26, 2012 11:14am Jun 26, 2012 11:14am
  •  jimmybeans
  • | Membership Revoked | Joined Jun 2012 | 94 Posts
your posted code contains this line:

Inserted Code
string Market_Price = DoubleToStr(Bid, Digits);

the *Digits* variable is a variable that is *built-in* to the metatrader platform. if your platform uses five digits, the Digits variable will contain a number five.

if you want to specify that your code uses four digits, then perhaps try making this modification to your code:

Inserted Code
string Market_Price = DoubleToStr(Bid, 4);

if you would like to use six digits, then try this:

Inserted Code
string Market_Price = DoubleToStr(Bid, 6);

the DoubleToStr function takes a floating point value and converts it into a text string, you are able to specify how many digits it will carry things out past the decimal point.. Your code, as you posted it, uses the built in variable of Digits, which contains the number of digits that your platform uses. I am assuming that your platform uses five digits?

i am a fairly experienced metatrader engineer, tho i have never been exposed to using the Object Creation functions, they are not of much interest to me. i tried running your code and it did not work for me, but i believe that i have documented the problem and the solution that you were looking for.

i am guessing, perhaps incorrectly, that you are losing your vision, as am i, and you are wanting to display the current price on the chart in an enlarged fashion? is that what you are attempting to do?
 
1
  • Post #4
  • Quote
  • Jun 26, 2012 12:35pm Jun 26, 2012 12:35pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Or use the attached (turn off the functions you don't need). Magnified bid price is rounded to 4/2 digits.

NOTE: Ticker requires Wingdings 2 font (attached in zip), for it to display the correct symbols.
Attached Image (click to enlarge)
Click to Enlarge

Name: Legend for Signal indicator.jpg
Size: 116 KB
Attached File(s)
File Type: ex4 Signal.ex4   47 KB | 220 downloads
File Type: mq4 Signal.mq4   105 KB | 267 downloads
File Type: zip WINGDNG2.ZIP   36 KB | 220 downloads
 
 
  • Post #5
  • Quote
  • Jun 29, 2012 2:13pm Jun 29, 2012 2:13pm
  •  apipshort
  • Joined Feb 2011 | Status: Member | 180 Posts
DoubleToStr(Bid, Digits - 1) will "round" to whole pips on the 5 & 3 Digit pairs.
USDCHF 0.9488
GBPJPY 125.25
 
 
  • Post #6
  • Quote
  • Last Post: Jul 3, 2012 5:06am Jul 3, 2012 5:06am
  •  dns_di
  • | Joined Jun 2011 | Status: Member | 97 Posts
Attached modified indi, now shows 4 digits and 2 digits for jpy.
Attached File(s)
File Type: mq4 Magnified Market Price.mq4   1 KB | 391 downloads
 
 
  • Platform Tech
  • /
  • modify to show 4 digit bid price instead of 5
  • 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