19 Comments
User's avatar
new trader's avatar

Hi Peter,

coming from part 35, there is a correct math formula to calculate the adding size, I wrote my code by my own and tested hundreds of times and it's no problem. I did a careful look into your code, and found your math formula used a wrong variable and thus flawed. Since I'm not a subscriber I can't DM you, so I'll leave it here and hope you can see:

for example adding long position, the correct math using your way should be

{RISK - (CURRENT POS * AVG PRICE - CURRENT POS * YOUR_NEW_STOP_PRICE}/{CURRENT PRICE - NEW STOP}

the difference is this YOUR_NEW_STOP_PRICE part, and the hotkey shall work again. hope it helps!

Expand full comment
Peter Benci's avatar

thank you! sometimes it needs just more eyes :) what was mind bending for me was the fact that once i reached the unrealized at the same value as the desired risk it zeored itself. i could not find the error in the formula implementation in the syntax so i thought it is a logical problem of some function limits reaching 0 and that there would be logically a new formula to use from the 0 point. i will edit both posts.

Expand full comment
Komal's avatar

Hello Peter,

So if I understand correctly, this is very similar to the Free roll hotkey from part 2, but in free roll along with adding more we are moving stop loss to breakeven. In this case we are adding more but also specifying the new stop loss risk dollar amount (which is different than breakeven) . Can you please confirm.

Expand full comment
Peter Benci's avatar

that is correct

Expand full comment
REDA's avatar

Hi Peter,

I’m using a simple hotkey to add to a position while keeping the same risk. It works on the first add, but on the second and third adds, it doubles the risk each time.

For example, if I start with a position risk of $20, then add with the same $20 risk, the first add works correctly. But on the next adds, the risk increases to $40, then $80.

Is there anything I can do to fix this? My strategy is to systematically add to my position when it’s in my favor, maximize it, then sell everything. How can I cap the risk per add to keep it consistent each time?

Can you help with this?

Expand full comment
Peter Benci's avatar

but if i should guess one of the variables is not updated

Expand full comment
REDA's avatar

No without touching the initial stop at all .

I’m using it in sim

Expand full comment
Peter Benci's avatar

i would need to retest it on monday to see it. if you have a video ornacreenshots of it that would help

Expand full comment
REDA's avatar

Yes indeed

Expand full comment
Peter Benci's avatar

what hotkey is that?

Expand full comment
REDA's avatar

The one on part 5 to add into position while keeping the same risk

Expand full comment
Peter Benci's avatar

are you using it in sim or live or replay?

Expand full comment
REDA's avatar

Sim

Expand full comment
Peter Benci's avatar

are you tightening/moving the stop?

Expand full comment
REDA's avatar

No

Expand full comment
Peter Benci's avatar

are you adding while the position goes to profit?

Expand full comment
REDA's avatar

Indeed

Expand full comment
Sebastian's avatar

How do you show only the line of the risk (in example 100 dollar risk) on average without any execution?

Expand full comment
Peter Benci's avatar

for this function see the advanced hotkeys 7 post from the series

Expand full comment