Page 1 of 1
Issue with leverage
Posted: Mon Sep 16, 2013 11:01 am
by render86
When I export the data to MT4, I specify 200 for the leverage. Yet when I then run a backtest on this data, I always get the leverage of 1:100 instead of the specified 1:200. Why?
P.S. My broker's default leverage is 1:500.
Re: Issue with leverage
Posted: Thu Sep 19, 2013 11:56 am
by render86
Here's more info on the problem: with Tickstory, MetaTrader4 gives incorrect margin. E.g. instead of 128000 in April 2013 for EURUSD (when the EURUSD price was around 1.28), the margin is 100000. This distorts the lot size of the EAs tested.
Re: Issue with leverage
Posted: Fri Sep 20, 2013 1:00 am
by tickstory
Hi render86,
We were unable to reproduce any issue with leverage using the following steps:
1) Select 'Export to MT4' on EURUSD.
2) In the Mt4 Export window, select Metatrader Info tab and specify the Account Leverage to be 200.
3) Press OK and wait for it to complete.
4) Launch Metatrader by pressing F8 in Tickstory.
5) Run MACD Sample with the following line of code inserted into the start() function:
Print("Acc lev: " + DoubleToStr(AccountLeverage(), 5));
6) Account leverage correctly reports that leverage is 200.
Hope this helps.
Re: Issue with leverage
Posted: Fri Sep 20, 2013 10:25 am
by render86
tickstory wrote:Hi render86,
We were unable to reproduce any issue with leverage using the following steps:
1) Select 'Export to MT4' on EURUSD.
2) In the Mt4 Export window, select Metatrader Info tab and specify the Account Leverage to be 200.
3) Press OK and wait for it to complete.
4) Launch Metatrader by pressing F8 in Tickstory.
5) Run MACD Sample with the following line of code inserted into the start() function:
Print("Acc lev: " + DoubleToStr(AccountLeverage(), 5));
6) Account leverage correctly reports that leverage is 200.
Hope this helps.
Kindly refer to the clarification in my second post. I don't mean the Leverage but MarginRequired which is given incorrectly in USD as base currency.
Re: Issue with leverage
Posted: Tue Sep 24, 2013 10:13 am
by tickstory
Hi Render86,
Could you provide the parameters/code that demonstrates which exported values do not match up with what you expect? The only control the export has is the specific values embedded in the FXT file as shown int he 'MT4 Info' tab - after that, you will need to consult the MQL manual for how to perform your lot calculation.
Thanks.
Re: Issue with leverage
Posted: Wed Oct 02, 2013 9:09 pm
by render86
tickstory wrote:Hi Render86,
Could you provide the parameters/code that demonstrates which exported values do not match up with what you expect? The only control the export has is the specific values embedded in the FXT file as shown int he 'MT4 Info' tab - after that, you will need to consult the MQL manual for how to perform your lot calculation.
Thanks.
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.
Re: Issue with leverage
Posted: Fri Oct 04, 2013 10:30 pm
by tickstory
Hi Render,
Are you able to manually edit this value? We will add an item to automatically calculate this in the future, however for the moment it is user-specified.
Thanks.
Re: Issue with leverage
Posted: Fri Oct 04, 2013 11:09 pm
by render86
tickstory wrote:Hi Render,
Are you able to manually edit this value? We will add an item to automatically calculate this in the future, however for the moment it is user-specified.
Thanks.
No, I am not, as the EUR price constantly changes throughout the backtest period.
Re: Issue with leverage
Posted: Wed Apr 22, 2015 11:38 pm
by tickstory