MT4 Broker - Units instead of lots? (Does this effect my code?) - page 2

 

Sorry for reviving this thread, but rather than start a new one I wanted to ask about trading metals via MT4 and the lot calculation you've suggested above...

When I back-test on XAUUSD I get two very dramatic results from simply changing the denomination of the account (GBP / USD)

Both the runs were identical all but the account denomination.

Forgive me for being daft, but I was under the impression tickvalue and ticksize took care of this issue? I take on 2% risk per trade with both runs, but by the looks of it, the GBP back-test seems to actually take on 1.50% max....?

(The TickSize and TickValue were both "0.01000000")

 

I didn't know that had a tester section.

How does that work? Do you run the test yourself and upload the results or is the testing done on their server?

Anyway, You can take the results from those tests with a pinch of salt. Most of the results are completely wrong .

See attached image, a combination from page 27 and the last trade on page 26 for the GBP version

2 trades entered and exited at the same time (duration 0 secs??!!), same entry and exit prices. The only difference is that one was for 637 lots and the other for 849. Both made the same profit in pips. But what is impossible is that despite different lotsizes, the profit for both trades is 484.91 !!

The results are peppered with mistakes like this, but not all as obvious. It is the same with the USD account. I estimate that there are miscepancies with about 50% of the results.

I cannot see that this is anything to do with your EA. All an EA can do is set entry and exits and lot sizes etc. Profit is calculated by the tester, so there is something seriously wrong here!

 

Yea you back-test within MT4 ST and then you upload it into.

I've spent a bit of time going through the history.

Correct me if I am wrong, but I import 1 minute bars from Forex Tester into ST (MT4) and where there is a trade that is less than 1 minute (which the example you've given above was), these trade durations can be illustrated as 0 seconds because I do not have tick data...

I checked one of those "0" second duration trades on the 8th of March this year, and that was a perfect trade (And was less than 1 minute duration - seconds!).

With that said, I know that these results are non dependable! And yes, it is impossible that there are trades with same entry, exit and profit, yet different lot sizing lol! So not sure about those ones... Either way, I wouldn't say as high as 50% errors, but it's certainly not 100%!!

It's frustrating that you can't get decent back-tested and reliable results! According to the data I used within ST the quality was 89% lol.

Anyway, despite the above; how come the position sizing is different with USD and GBP?

 
DomGilberto:


Anyway, despite the above; how come the position sizing is different with USD and GBP?

Because TICKVALUE is a current value and for XAUUSD with an account currency of USD it is fixed . . so is correct, for an account currency of GBP you need the historical value of TICKVALUE and you can't get it, you can calculate it if you really want to and you have the correct historical data.

Didn't I already mention this ?
 
Yea you did mention that, but I assumed you meant "current" being at the time I call MarketInfo(Symbol(), MODE_TICKVALUE)).... Tbh, I obviously didn't completely understand what you were trying to say until now...

How would I go about doing the second part then...?
 
Wait, are you saying the tickvalue is the current value when running strategy tester? Using tickvalue the way I am, will do the job on live XAGUSD/XAUUSD markets, right....? (confused)
 
DomGilberto:
Wait, are you saying the tickvalue is the current value when running strategy tester? Using tickvalue the way I am, will do the job on live XAGUSD/XAUUSD markets, right....? (confused)
Yes, it should, I've not checked what you have done though . . . it's only a problem in the Strategy Tester.
 
RaptorUK:
Yes, it should, I've not checked what you have done though . . . it's only a problem in the Strategy Tester.


Ahhh right lol. I spent a fair amount of time reading and looking into what someone had helped me do on my other thread regarding position sizing... Was concerned it didnt do the job with gold/silver...
Reason: