molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Sat May 11, 2024 4:30 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Conditions based on exact pip value
PostPosted: Thu May 03, 2012 3:39 pm 
Offline

Joined: Thu May 03, 2012 3:30 pm
Posts: 2
Hello, first post of an EA newcomer, and actually forex newb altogether.

To the chase, how do I create a condition that compares Close against Open for a certain amount of pips difference. For now I see only general comparison operators (higher than, lower/equal than, etc.), while what I need is say, check for 20 pips difference.

Thanks in advance.
R


Top
 Profile  
 
 Post subject: Re: Conditions based on exact pip value
PostPosted: Mon May 07, 2012 9:07 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
You can:
1 create it in the mql icon
2 or as an indicator in the indicator builder and then import it into the builder

In the mql icon use the indicator button and insert it
you can create soemthing like open - close > 0.0005 for 5 pips for EURUSD. Make sure you know how to manage the + or - since sometimes open>close or close>open. Maybe you need to use an absolute number. So do MathAbs(equation)>0.0005


Top
 Profile  
 
 Post subject: Re: Conditions based on exact pip value
PostPosted: Thu May 10, 2012 3:23 pm 
Offline

Joined: Thu May 03, 2012 3:30 pm
Posts: 2
Thanks, this was very helpful, now I can do what I wanted to!

But tell me, isn't 0.00001 a pip? It goes all the way to 5 digits off the dot in MT4
Please advise. Thanks


Top
 Profile  
 
 Post subject: Re: Conditions based on exact pip value
PostPosted: Fri May 11, 2012 8:53 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
It really depends on the pair (i.e. JPY has less digits)
For EURUSD (and most pairs) 0.00001 is a fractional pip or pipette, and 0.0001 is a pip
You should take this free course http://www.babypips.com/school/pips-and-pipettes.html - it's really good if you are new to forex


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009