JFOREX / BTCUSD MM bug

Dear SQ team,



in my opinion there is a bug in the JFOREX strategies (which is new in build 130.467).


I created a JFOREX strategy in BTCUSD with MM of lot=0.01. This opened in JFOREX 1000 BTC.


So I tried a setting of lot=0.0000001, which opened 0.01 BTC.


So in my understanding there is a mismatch in MM setting regarding lot of factor x100.000.


I also tried out FOREX pairs and they worked correct(0.01 lot in strategy = 0.01 in trading). So this potential bug could be restricted to crypto like BTCUSD.


It would be a good idea to check that.


Thanks in advance.
Christian

Attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Low

History

CW
#1

ChrisWhite

27.12.2020 11:47

Task created

MF
#2

Mark Fric

03.02.2021 15:04

Priority changed from Normal to Low

CW
#3

ChrisWhite

04.02.2021 10:34
I've found the problem.


JForex uses as lot size millions for all pairs (incl. CFD, commodities). I've seen it in the documentation.


So 0,000001 lot (in SQX) BTCUSD x 1.000.000 x 0,1 = 0,1 lot (JFOREX) BTCUSD


The same for forex pairs.


0.01 lot (in SQX) EURUSD x 1.000.000 x 0,1 = 10.000 EUR (in unit) x 0,1 = 1.000 EUR = 0.01 lot (JFOREX) EURUSD.


There is a factor of x0,1 for internal calculation. I do not know, where it comes from. So for FOREX at the end 0.01 input = 0.01 output, but for CFD's it is different. 


I hope that helps.


Christian 


CW
#4

ChrisWhite

05.02.2021 10:03

Attachment Input_versus_outcome_Preset.jpg added

Input_versus_outcome_Preset.jpg
(31.63 KiB)
Here is a list of input in presets and the respective outcome.


Christian

TT
#5

Tamas

24.02.2021 10:09

Status changed from New to Fixed


Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please