+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 26
 0 Attachment(s)    

Thread: Modifications for a 5 digits broker

  1. #1
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,455

    Default Modifications for a 5 digits broker

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

  2. #2
    Member
    Join Date
    Nov 2008
    Posts
    257

    Default

    Quote Originally Posted by funyoo View Post
    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. #3
    Member
    Join Date
    Jan 2009
    Posts
    151

    Default

    Quote Originally Posted by przem81621 View Post
    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. #4
    Member
    Join Date
    Jan 2009
    Posts
    151

    Default

    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;
    NewAddLevelPoints=AddLevelPoints;
    
    int HalfDigits,DoubleDigits;
    HalfDigits=MathFloor(MarketInfo(Symbol(),MODE_DIGITS)/2);
    DoubleDigits=HalfDigits*2;
    if(DoubleDigits!=MarketInfo(Symbol(),MODE_DIGITS)) {NewPipsBeforeSLatBreakeven=PipsBeforeSLatBreakeven*10; NewPipsToTrail=PipsToTrail*10; NewAddLevelPoints=AddLevelPoints*10;}
    //End of code to adjust stop-losses

  5. #5
    Member
    Join Date
    Nov 2008
    Posts
    257

    Default

    [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.
    but, i asked about value of indicators and distance between lines.

    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. #6
    Member
    Join Date
    Jan 2009
    Posts
    151

    Default

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

  7. #7
    Member
    Join Date
    Jan 2009
    Posts
    151

    Default

    Quote Originally Posted by przem81621 View Post
    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. #8
    Member
    Join Date
    Nov 2008
    Posts
    257

    Default

    Quote Originally Posted by jezzer1961 View Post
    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;
    ...
    if(UseDistance&&(HMAA-HMAB)>=Distance*Point)HMABuy="true";
    ...

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

    if we know that Point = ...?

  9. #9
    Member
    Join Date
    Jan 2009
    Posts
    151

    Default

    Quote Originally Posted by przem81621 View Post
    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;
    ...
    if(UseDistance&&(HMAA-HMAB)>=Distance*Point)HMABuy="true";
    ...

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

    if we know that Point = ...?
    Don't worry about your English. Mine is pretty bad too and I'm from London.

    So that I get this right, what are HMAA and HMAB? I'm guessing, but are they moving averages?
    PipRider.com - The home of the PipRider EA. From $100 to over $1m in 10 year backtest, and it works LIVE too!!

  10. #10
    Member
    Join Date
    Nov 2008
    Posts
    257

    Default

    Quote Originally Posted by jezzer1961 View Post
    Don't worry about your English. Mine is pretty bad too and I'm from London.

    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

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Forex broker rebates
    By funyoo in forum Metatrader brokers
    Replies: 6
    Last Post: 08-16-2010, 18:02
  2. Micro broker
    By starlimit03 in forum Metatrader brokers
    Replies: 3
    Last Post: 05-28-2009, 16:39
  3. Zero spreads broker
    By funyoo in forum General discussion
    Replies: 2
    Last Post: 02-28-2009, 03:02
  4. How to use an EA with a 5 digits broker
    By funyoo in forum General discussion
    Replies: 7
    Last Post: 02-16-2009, 06:12
  5. How can we get rid of broker servers foults
    By falanca in forum General discussion
    Replies: 0
    Last Post: 02-03-2009, 20:20

Posting Permissions

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