Discussion about this post

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
Barry's avatar

Hi Peter, with this hotkey, do I

(1) FIRST KEY IN MANUALLY the initial share quantity in the montage window

(2) SECONDLY ACTIVATE THE HOT KEY and then the script the calculates the stops for me based on my risk?

Did I get the logic right? Thank you.

Expand full comment
23 more comments...

No posts