How to code? - page 55

 

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

 

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?

 
ralph.ronnquist:
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

 

Hi,

NorthFinance just adds another digit so EUR/USD! is 1.47125

 
FXTradepro:
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:

double pips() { return ( Point * 10.0 ); }[/PHP]

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:

double pips(int points) { return ( 1.0 * points / 10.0 ); }

Then the spread value component in the ObjectSetText call would be like:

[PHP]DoubleToStr( pips( Spread ), 1 )
 

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

 

Please Help Me

can you any body help me?

I want expert 20_200 with trailing stop.

PLEASE put anybody.

Files:
 

please

PANNEK:
can you any body help me?

I want expert 20_200 with trailing stop.

PLEASE put anybody.

little help

 
MrPip:
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:

myPoint = 0.0001; if (Digits < 4) myPoint = 0.01;
 

Newdigital

PANNEK:
can you any body help me?

I want expert 20_200 with trailing stop.

PLEASE put anybody.

please help NEWDIGITAL

Files:
Reason: