Go Back   Forex-TSD > Programming > MetaTrader Programming
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #541 (permalink)  
Old 12-10-2007, 08:41 AM
Junior Member
 
Join Date: Jun 2007
Posts: 3
Hisashi is on a distinguished road
Question Need EA to copy to have multiple orders with the same conditions

Hello.

I am looking for EA that copies a pending order and makes it muptiple with exactly the same conditions.
For example, let's say I have a pending order USD/JPY entry-stop sell 1 lot at 115.00, and I wanna have 5 same orders.
I do not wanna merely increase the trade size, instead of having multiple positions with the same conditions.
Is there an EA that does such a thing for me?

Also, I tried e-Trailing.mq4 but I could not place the trailing stop for multiple orders.
I need to place a trailing stop at 5 pips from the current price, for multiple open orders.
Any good EA for it?

Regards

Last edited by Hisashi; 12-10-2007 at 12:53 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #542 (permalink)  
Old 12-10-2007, 12:47 PM
Junior Member
 
Join Date: Jul 2007
Posts: 14
FXTradepro is on a distinguished road
A Little Help with an Indicator - Coder's Please Look

I am testing an MT4 Broker's Platform that uses Fractional Pips (pipettes) in it's price quotations: For Example on EURJPY they quote as 164.381 instead of 164.38 - This means that the spread has a decimal such as 4.1 pips (instead of 4).

Can anyone tell me how to MODIFY the following code so that the Spread reads properly? Right now a 4.1 pip spread would read as 41.0 in the Indicator. Any help is appreciated.

Dan

//---- spread
Spread=NormalizeDouble((Ask-Bid)/Point,1);
ObjectSetText("Spread Monitor1","Spread:", 10, "Arial", labelColor);
ObjectSetText("Spread Monitor2",DoubleToStr(Spread,1),10, "Arial", clockColor);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #543 (permalink)  
Old 12-10-2007, 01:18 PM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 297
ralph.ronnquist is on a distinguished road
Perhaps "Point" tells what the price movement granularity is, which then for your EURJPY example would be 0.001, and not what the idea of "integral pips" (0.01) is? You can test that. If that's the case, you might need to use "(Point*10)" instead of "Point" in calculations.

Or perhaps you can simply accept that the "pips" they talk about are 1/10th of the "pips" you are used to? E.g., what happens to the "slippage" parameter to OrderSend? is that in the usual pips or in pipettes?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #544 (permalink)  
Old 12-10-2007, 01:35 PM
Junior Member
 
Join Date: Jul 2007
Posts: 14
FXTradepro is on a distinguished road
Quote:
Originally Posted by ralph.ronnquist View Post
Perhaps "Point" tells what the price movement granularity is, which then for your EURJPY example would be 0.001, and not what the idea of "integral pips" (0.01) is? You can test that. If that's the case, you might need to use "(Point*10)" instead of "Point" in calculations.

Or perhaps you can simply accept that the "pips" they talk about are 1/10th of the "pips" you are used to? E.g., what happens to the "slippage" parameter to OrderSend? is that in the usual pips or in pipettes?
Thanks for the response - I am not a coder so this is a bit foreign to me. I did try Point*10 and that made the spread reading 410 pips. I also tried Point/10 and that made the spread reading 4.0 pips which appears to be "rounding" off the actual number which should have been 4.1 pips.

I do have a script for sending orders that I had to modify using Point*10, but I cannot seem to get this spread reading correct.

I think this is going to become an issue for many Indicators, Scripts and EA's, as I have heard that many MT4 Brokers might be adopting the fractional pip concept on their platforms.

Any other advice would be appreciated.

Dan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #545 (permalink)  
Old 12-10-2007, 05:54 PM
Senior Member
 
Join Date: Apr 2006
Posts: 166
InTrance is on a distinguished road
Hi,

NorthFinance just adds another digit so EUR/USD! is 1.47125
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #546 (permalink)  
Old 12-10-2007, 08:42 PM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 297
ralph.ronnquist is on a distinguished road
Quote:
Originally Posted by FXTradepro View Post
Thanks for the response - I am not a coder so this is a bit foreign to me. I did try Point*10 and that made the spread reading 410 pips. I also tried Point/10 and that made the spread reading 4.0 pips which appears to be "rounding" off the actual number which should have been 4.1 pips.

I do have a script for sending orders that I had to modify using Point*10, but I cannot seem to get this spread reading correct.

I think this is going to become an issue for many Indicators, Scripts and EA's, as I have heard that many MT4 Brokers might be adopting the fractional pip concept on their platforms.

Any other advice would be appreciated.

Dan
No worries. As I understand it, the term "pips" has grown a definition relating to trade size, meaning that a 1 pip move of a 1 lot trade corresponds to a known value amount. The term "Point" in MT4 more strictly means the granularity of price movement, i.e. the smallest difference there can be between two prices; or that every Bid/Ask price is some integer N times Point.

So far there has been a 1-1 translation between pips and Point in MT4, but that's no longer the case. Instead, for your broker, you have 1 pip = 10 Point, and therefore, if you want the "spread" variable to be in pips you will have to use the expression "(Point*10)" wherever you previously used "Point". The expression is without the double-quotes, but *with* the parentheses.

To make it very clear in the code, you could also add a function to provide the appropriate pips measure:
PHP Code:
double pips() { return ( Point 10.0 ); } 
and in that case, you would replace "Point" at all other places with the function call "pips()".

Alternatively, you let the program work with the Point granularity, and merely translate to pips when the spread value is presented. I.e. forget about using the pips() function above, but have the following function for translating a Points value to be a pips value:
PHP Code:
double pips(int points) { return ( 1.0 points 10.0 ); } 
Then the spread value component in the ObjectSetText call would be like:
PHP Code:
DoubleToStrpipsSpread ), 

Last edited by ralph.ronnquist; 12-10-2007 at 08:44 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #547 (permalink)  
Old 12-11-2007, 01:44 AM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 560
MrPip is on a distinguished road
Problem with Point

I now use the following code and replace all occurances of Point with myPoint.

First I declare a global variable

double myPoint;

I then add the following line in Init function.

myPoint = SetPoint();

Then add the function

double SetPoint()
{
double mPoint;

if (Digits < 4)
mPoint = 0.01;
else
mPoint = 0.0001;

return(mPoint);
}

This works whether the broker uses fractional pips or not.


Robert
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #548 (permalink)  
Old 12-11-2007, 07:16 AM
PANNEK's Avatar
Junior Member
 
Join Date: Jul 2007
Posts: 20
PANNEK is on a distinguished road
Please Help Me

can you any body help me?
I want expert 20_200 with trailing stop.
PLEASE put anybody.
Attached Files
File Type: mq4 20_200 expert_v3.mq4 (5.0 KB, 23 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #549 (permalink)  
Old 12-11-2007, 09:35 AM
PANNEK's Avatar
Junior Member
 
Join Date: Jul 2007
Posts: 20
PANNEK is on a distinguished road
please

Quote:
Originally Posted by PANNEK View Post
can you any body help me?
I want expert 20_200 with trailing stop.
PLEASE put anybody.
little help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #550 (permalink)  
Old 12-11-2007, 09:37 AM
Senior Member
 
Join Date: Feb 2006
Posts: 592
Michel is on a distinguished road
Quote:
Originally Posted by MrPip View Post
I now use the following code and replace all occurances of Point with myPoint.

First I declare a global variable

double myPoint;

I then add the following line in Init function.

myPoint = SetPoint();

Then add the function

double SetPoint()
{
double mPoint;

if (Digits < 4)
mPoint = 0.01;
else
mPoint = 0.0001;

return(mPoint);
}

This works whether the broker uses fractional pips or not.


Robert
You do not really need a function, it's enough to put in the init() function:
PHP Code:
myPoint 0.0001;
if (
Digits 4myPoint 0.01
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
#include, candle time, CHinGsMAroonCLK, code, coders guru, conditionally, crossover, dll, eli hayun, Eur_harvester.ex4, expert adviser, expert advisor, forex, Gann Hilo, higher high, how to code, indicator, I_XO_A_H, kehedge, mechanical trading, metatrader command line, mql4, mt4, MT4-LevelStop-Reverse, OrderReliable.mqh, programming, rectangle tool, strings, time range high low, trading, volty channel stop


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to code this? iscuba11 Metatrader 4 mql 4 - Development course 1 08-03-2007 04:22 PM


All times are GMT. The time now is 01:52 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.