Getting spread in MetaTrader 4
  #1 (permalink)  
Old 05-12-2006, 06:46 PM
Freshman
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
karan is on a distinguished road
Default Getting spread in MetaTrader 4

am using the following to compute the spread in points for the current chart:

string symbol = Symbol(); // Get chart symbol
int spread = MarketInfo(symbol,MODE_SPREAD);

spread is being set to 0. I have verified that symbol is valid (set to "EURUSD").

What is wrong with the above?
Reply With Quote
  #2 (permalink)  
Old 05-12-2006, 11:18 PM
scorpion's Avatar
Forex Guru
 
Join Date: Aug 2004
Posts: 2,118
Thanks: 213
Thanked 387 Times in 155 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Default

For current chart, use this karan:
PHP Code:
int spread = (Ask Bid) / Point
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #3 (permalink)  
Old 05-22-2006, 04:15 AM
Freshman
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
karan is on a distinguished road
Question

Quote:
Originally Posted by scorpion
For current chart, use this karan:
PHP Code:
int spread = (Ask Bid) / Point
Thanks Scorpion.

Do you or anyone else on this forum know of a way to pass MQL4 strings by reference to a DLL written in C?

I looked at the ExpertSample.dll but it is not of much help.
Reply With Quote
  #4 (permalink)  
Old 05-23-2006, 04:31 AM
scorpion's Avatar
Forex Guru
 
Join Date: Aug 2004
Posts: 2,118
Thanks: 213
Thanked 387 Times in 155 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Default

I'm not sure but someone suggested this:
PHP Code:
#import "your.dll"
int yourmethod(stringsome_string);
#import 
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upcoming MetaTrader Version 4 scorpion MetaTrader and ZeroCode 13 07-18-2009 06:05 PM
Metatrader 4 released Rastarr MetaTrader and ZeroCode 18 10-07-2008 09:56 AM
Oanda's Spread during News gazuz Brokers/Platforms 0 09-05-2006 05:42 PM
Neurex goes to metatrader 4 !!! Belzebut MetaTrader and ZeroCode 1 07-07-2005 10:14 AM
Security Issues in MetaTrader 4 scorpion MetaTrader and ZeroCode 3 01-27-2005 02:51 PM


All times are GMT. The time now is 10:15 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now