Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-22-2006, 06:01 PM
EACAN EACAN is offline
Senior Member
 
Join Date: Jun 2006
Posts: 313
EACAN is on a distinguished road
Price

Hi,

I am trying to create an ea using fibs and what i am trying to do is
taking todayClose + (yesterday High - yesterday Low ) * 0.382;
but when i send this at order send function the tester shows inalid price ?? e.g 1.28574534 something like this any help

thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-22-2006, 10:16 PM
lowphat's Avatar
lowphat lowphat is offline
Senior Member
 
Join Date: Sep 2005
Posts: 199
lowphat is on a distinguished road
I think you can use NormalizeDouble

double var1=0.123456789;
Print(NormalizeDouble(var1,4));
// output: 0.1234

Last edited by lowphat : 06-22-2006 at 10:42 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-22-2006, 10:46 PM
EACAN EACAN is offline
Senior Member
 
Join Date: Jun 2006
Posts: 313
EACAN is on a distinguished road
Quote:
Originally Posted by lowphat
I think you can use NormalizeDouble

double var1=0.123456789;
Print(NormalizeDouble(var1,4));
// output: 0.1234
lowphat many thanks for the suggestion but i think since the ea could run on any currency putting something hardcoded wont work i think i try to use your suggestion for eur/usd now untill i find someother solution.

regards.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-23-2006, 02:39 AM
Maji Maji is offline
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
Say, price = todayClose + (yesterday High - yesterday Low ) * 0.382

You apply the Normalize double like this:

NormalizeDouble(price, Digits);

Digits is the built in rounding off parameter.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-23-2006, 09:27 AM
EACAN EACAN is offline
Senior Member
 
Join Date: Jun 2006
Posts: 313
EACAN is on a distinguished road
Maji,lowphat thanks i understand now what is implied with Normalize Double Method.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
MTF Price keris2112 Indicators - Metatrader 4 17 02-03-2008 04:47 PM
Price System Kurka Fund Expert Advisors - Metatrader 4 0 11-18-2006 07:14 PM
Price Histogram fingermark Metatrader 4 1 11-06-2006 06:58 AM


All times are GMT. The time now is 06:30 AM.