EasyLanguage - SQ_StocksSizeByPrice

I needed to change:



If OpenPrice > 0 Then begin
Balance = InitialCapital + NetProfit;
// If UseAccountBalance then TradeSize = Balance / OpenPrice Else TradeSize = (Balance + OpenPositionProfit) / OpenPrice;
If UseAccountBalance then TradeSize = Balance / OpenPrice Else TradeSize = (InitialCapital) / OpenPrice;


In order for trade size to work properly.  Otherwise it always uses the Balance to calculate TradeSize.

Attachments
No attachments
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

BT
#1

EndUser

30.05.2023 16:19

Task created

E
#2

Emmanuel

30.05.2023 20:40
Voted for this task.
MF
#3

Mark Fric

31.05.2023 10:17

Status changed from New to Refused

this works exactly as it should. 


It should compute the trade size from the actual balance on your account, not from initial balance.

BT
#4

EndUser

31.05.2023 14:50
The code makes it irrelevant if you use money management or not.  Why have a setting in SQX for using Initial Balance only, if you then have a function in EasyLanguage that doesn't enable that?  It makes it impossible to verify a strategy performance between the two platforms if you can't have the same settings in effect.  When you use the new code, then you can use the boolean flag to see the difference money management makes.
MF
#5

Mark Fric

01.06.2023 08:29

Status changed from Refused to Fixed

you are right, my bad, I overlooked it. 


The second option should be only about initial capital, as you suggested,. We'll fix it.


Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please