Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • kentzversky
    Participant
    Post count: 4

    Ok, I’m getting closer to solution.
    A like problem was described here:
    http://www.tickstory.com/forum/viewtopic.php?f=4&t=275:
    The MT4 tester, following the hack by your program, issues a wrong number in response to the query MarketInfo(EURUSD, MODE_MARGINREQUIRED)). For EURUSD, the lot price (100000 EUR) should depend on the Euro’s current price (136000 as of now) while with Tickstory, MT4 issues 100000.

    Above is true:

    0	18:55:06	2015.04.01 00:00  lotcalculations EURUSD,M1: --- --- AccountCurrency: USD
    0 18:55:06 2015.04.01 00:00 lotcalculations EURUSD,M1: --- --- Symbol: EURUSD
    0 18:55:06 2015.04.01 00:00 lotcalculations EURUSD,M1: --- --- AccountLeverage: 500.00000000
    0 18:55:06 2015.04.01 00:00 lotcalculations EURUSD,M1: --- --- AccountBalance: 100.00000000
    0 18:55:06 2015.04.01 00:00 lotcalculations EURUSD,M1: --- --- MODE_MARGINREQUIRED: 200

    Should be:


    0 18:58:02 2015.04.01 00:00 lotcalculations EURUSD,M1: --- --- MODE_MARGINREQUIRED: 214.99

    I found a possible workaround:
    -we want to trade EURUSD,
    -we have account currency: USD
    -Tools>Export to MT4>Metatrader Info: “Margin ccy:” field is set to USD by default (or by TS script), but

    if you change “Margin ccy:” field to EUR (for AUDUSD to AUD aso) you will get results pretty close to real.

    Notable that formerly this field was called “Currency:” and depicted account currency.

    So what exactly “Margin ccy:” means?

    kentzversky
    Participant
    Post count: 4

    Thanks you kindly, I know where to enter this settings but..

    the question was:
    How do Tickstory obtain this values for ‘Free Margin Mode’?

    As this values are obtained via tickstory script, so its done by some mql4 commands.
    Can you provide us with the line of code with this calculations. Seems there is a error for my provider so i cant find out where.

    I’ve got closer to the problem:
    MarketInfo(Symbol(),MODE_MARGINREQUIRED) returns different results:

    from tester on REAL account (EURUSD Balance $100):
    221.61
    from tester on SAME account with tickstory data (EURUSD Balance $100):
    200
    (like if i had initial deposit in EUR)

    kentzversky
    Participant
    Post count: 4

    Thank’s for reply tickstory!

    How do Tickstory obtain this values? I didn’t find any straight analogs in mql4

    MarketInfo():
    MODE_PROFITCALCMODE: Profit calculation mode. 0 – Forex; 1 – CFD; 2 – Futures
    MODE_MARGINCALCMODE: Margin calculation mode. 0 – Forex; 1 – CFD; 2 – Futures; 3 – CFD for indices

    are not coresponding to your’s;
    Dont Use = 0
    Use All = 1
    Use Profit = 2
    Use Loss = 3

    If the is no analog – can you explain calculation method of each position.
    Thank’s!

Viewing 3 posts - 1 through 3 (of 3 total)