# Thread: Modifications for a 5 digits broker

1. ## Modifications for a 5 digits broker

You have just to multiply the StopLoss, TakeProfit, TrailingStop and BreakEven by 10.

2. Originally Posted by funyoo
You have just to multiply the StopLoss, TakeProfit, TrailingStop and BreakEven by 10.
hy
what is the point in 5digit broker?
if sometimes it's nesessery to use f.e. distance between main and signal stoch line and it's 5 on 4digit , so on 5digit brokers we must multiply value of distance by 10 as SL ?

3. Originally Posted by przem81621
hy
what is the point in 5digit broker?
if sometimes it's nesessery to use f.e. distance between main and signal stoch line and it's 5 on 4digit , so on 5digit brokers we must multiply value of distance by 10 as SL ?
The point of a 3/5-digit broker is that it gives them the opportunity to offer tighter spreads (eg 2..5 pips instead of 3 pips).

There is another thread on the go which gives ideas on how to automatically adjust TPs and SLs inside an EA so that they will work on 3/5-digit brokers without having to multiply any of the variables by 10.

The logic is simple. You halve the digits and take the MathFloor of the result.

So for a 5-digit broker, this will return 2. You then multiply this result by 2 and if the answer is less than the digits you multiply TPs, SLs, etc by a factor of 10 before processing them further in OrderSend() functions.

4. You will need to declare the variables first. They will probably be different to mine anyway.

Then .........

Code:
```//Code to adjust stop-losses for odd Alpari Point
NewPipsBeforeSLatBreakeven=PipsBeforeSLatBreakeven;
NewPipsToTrail=PipsToTrail;

int HalfDigits,DoubleDigits;
HalfDigits=MathFloor(MarketInfo(Symbol(),MODE_DIGITS)/2);
DoubleDigits=HalfDigits*2;
//End of code to adjust stop-losses```

5. [QUOTE=jezzer1961;7938]You will need to declare the variables first. They will probably be different to mine anyway.

Then .........

yes, thanks
it's clear.

if(Rsi(1)-Rsi(0))>distance4dig* Point ....
it will be the same on 5 digit broker?

if Point on 4-broker = 0.0001 and for 5digit it.s = 0.00001 ,
so if i want the same value it's mean that must for 5 digit broker
dictance5dig=10*distance4dig

am i wright ?

6. Sorry, I haven't got a clue what you're trying to do there.

7. Originally Posted by przem81621
hy
what is the point in 5digit broker?
if sometimes it's nesessery to use f.e. distance between main and signal stoch line and it's 5 on 4digit , so on 5digit brokers we must multiply value of distance by 10 as SL ?
This has been puzzling me, but I think I understand what you're trying to say now.

No, you don't have to multiply anything at all with an indicator buffer for different brokers. The multiplication is only to convert price points.

8. Originally Posted by jezzer1961
This has been puzzling me, but I think I understand what you're trying to say now.

No, you don't have to multiply anything at all with an indicator buffer for different brokers. The multiplication is only to convert price points.
thanks jezz
sorry that my english is so hard to undestand
of course I don't want multiply value of indicators.
Look , in some ea is that condition :
...
extern bool UseDistance=false;
extern double Distance=7;
...
...

question was :
if Distance on 4brokers is 7 , it should be 7 on 5brokers or 70 ?

if we know that Point = ...?

9. Originally Posted by przem81621
thanks jezz
sorry that my english is so hard to undestand
of course I don't want multiply value of indicators.
Look , in some ea is that condition :
...
extern bool UseDistance=false;
extern double Distance=7;
...
...

question was :
if Distance on 4brokers is 7 , it should be 7 on 5brokers or 70 ?

if we know that Point = ...?

So that I get this right, what are HMAA and HMAB? I'm guessing, but are they moving averages?

10. Originally Posted by jezzer1961

So that I get this right, what are HMAA and HMAB? I'm guessing, but are they moving averages?
double HMAA=iCustom(Symbol(),0,"HMA",HMAPeriod1,HMAMethod 1,HMAPrice1,2,0);
double HMAB=iCustom(Symbol(),0,"HMA",HMAPeriod2,HMAMethod 2,HMAPrice2,2,0);

hma indicator

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•