READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

Adding Code

1 replies

SQuse

Subscriber, bbp_participant, community, 38 replies.

Visit profile

11 years ago #113035

Hello,
 
I need to know where in code I have to change the lot number for my own position sizing please.
 
I changed in line 591 of a strategy :
 
double orderLots = getLots(SL*gPointPow);
 
with
 
double orderLots = getLotsByConstantValue(openPrice);
 
I have a function that will be called at the beginning and at the end of the predefined code of StrategyQuant it will calculate lot size.
This line 591 is the only line I found where to change the lot number. Is that correct ?
 
Because I do not use the money management and all the other lines are not affected different than line 591 with orderLots. So only
the word orderLots refers to the calculated lot size. Correct ?
 
I must know this, because I get some strange values, and I do not think that the formula is wrong at this point.
 
Thank you for any help.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

11 years ago #128165

Hello,

 

lots are computed using the call 

double orderLots = getLots(SL*gPointPow);

 

so you found it correctly. If you want to use your own MM then just replace our function getLots() with your own function and it should work.

 

There is also a check:

if(orderLots > MaximumLots) {
      orderLots = MaximumLots;
}
 
just below this call – if you don’t want to check for maximum lots you can delete it.

Mark
StrategyQuant architect

0

Viewing 1 replies (of 1 total)