Julien Maisan 4 Posted October 9, 2020 Hello All, I would like to have an Add hotkey calculating automatically my share size based on my actual size and my new stop loss to increase my existing position. All that is based on Aiman trading style building up a position when the trade goes his way. I think the script could be based on Thor's free-roll hotkey as he uses his unrealized to calculate automatically an add (see his script below) ; on my side, I would like to use my unrealized (potentially positive or negative depending on my initial entry) + my fixed R risk amount (let's say 10$) >> I think it should be possible tweaking a bit Thor's free-roll but I could not make it. If anybody could help me, that would be very nice. Thank you all ! Julien Thor's free-roll for a long entry : CXL ALLSYMB;StopPrice = Price;Share=Price*100;Price=AvgCost;SShare=Price*100;Share=Share-SShare;Price=Share;Price=Share/100;Share=Pos * Price;Price=Ask-StopPrice;SShare=Share / Price;DefShare=BP*0.97;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;SShare=DefShare-SShare;Share=0.5*SShare;Price=Ask+0.02;TogSShare;TIF=DAY+;ROUTE=SMRTL;BUY=SEND;DefShare=10; TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+; Share this post Link to post Share on other sites
Abdul Sultani 0 Posted December 9, 2020 Hey Julien, I am looking for the same hotkey to scale into position with same original risk amount. Have you had any luck in figuring this one out? Share this post Link to post Share on other sites
KyleK29 257 Posted December 10, 2020 If I understand you correctly .. it's this scenario: 1) You enter a position, 100 shares at 10.00, stop at 9.00 (100 $risk). 2) As time goes on, you move your stop up to 9.50 (your new risk is $50), you want it to calculate the shares necessary to add the missing $50 risk at the current Last Price to get your risk back to $100. I have a hotkey that does this that I created around the same time I did Thor's. It just isn't out yet. I won't be releasing it until likely next month as it's still being tested. --------------------------------------------------------- ○ Profile / Project Pages (Dynamic Hotkeys, StreamDeck Files, and other contributions are located here) Share this post Link to post Share on other sites
Julien Maisan 4 Posted December 10, 2020 Hey guys, I finally did it by myself and tested it the last 2 months (in SIM and then live) and it works pretty well ; here are the scripts : To add 10$ risk LONG : CXL ALLSYMB;StopPrice = Price;Share=Price*100*Pos;Price=AvgCost;SShare=Price*100*Pos;Share=Share-SShare+1000; Price=Share/100;Share=Price;Price=Ask-StopPrice;SShare=Share / Price;DefShare=BP*0.97;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;SShare=DefShare-SShare;Share=0.5*SShare;Price=Ask+0.02;TogSShare;TIF=DAY+;ROUTE=LIMIT;BUY=SEND;DefShare=10; TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+; To ass 10$ risk SHORT : CXL ALLSYMB;StopPrice = Price;Share=-Price*100*Pos;Price=AvgCost;SShare=-Price*100*Pos;Share=Sshare-Share+1000; Price=Share/100;Share=Price;Price= StopPrice-Bid;SShare=Share / Price;DefShare=BP*0.97;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;SShare=DefShare-SShare;Share=0.5*SShare;Price=Bid-0.02;TogSShare;TIF=DAY+;ROUTE=LIMIT;SELL=SEND;DefShare=10; TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+; As usual, you have to change the route from LIMIT to SMRTL if you trade with IB, and the risk amount is multiplied by 100 in the hotkey script, so you just have to change the underlined and bold 10. Just one additional important point, it only works when your new stop loss and your new entry are in the direction of your trade, which anyway corresponds to your add strategy. However, if you select a wider stop for your add (which is theoretically impossible if you want to keep the same R amount), it still calculates a nb of shares (because one of the field used in the script automatically transforms negative values in positive ones) I hope it helps. Do not hesitate to reach out if necessary. 1 Share this post Link to post Share on other sites
Abdul Sultani 0 Posted December 11, 2020 Julian, Kyle, thank you both! Julian, I will test the HKs tomorrow and let you know. thank you so much for sharing! Share this post Link to post Share on other sites
ChartistArtist 0 Posted March 17, 2023 @Abdul @Julien Maisan @Abdul Sultani Hello Gentleman, did anyone get this working? I trade similar and scale into my positions, it is horribly inefficient for me to enter my position then have to use excel to figure out my adds and new stops lol I usually add 4 or 5 time to my short position (primarily short bias). Would appreciate all and any help, and will pay to get this script. Share this post Link to post Share on other sites
ChartistArtist 0 Posted March 18, 2023 On 12/10/2020 at 11:39 AM, KyleK29 said: If I understand you correctly .. it's this scenario: 1) You enter a position, 100 shares at 10.00, stop at 9.00 (100 $risk). 2) As time goes on, you move your stop up to 9.50 (your new risk is $50), you want it to calculate the shares necessary to add the missing $50 risk at the current Last Price to get your risk back to $100. I have a hotkey that does this that I created around the same time I did Thor's. It just isn't out yet. I won't be releasing it until likely next month as it's still being tested. Hello Has this script been released? I am looking for this one and will pay for it. I short stocks and I keep R fixed and add in the money + move my stop, 3 to 4 times. It would be amazing if i could execute with the hot key instead of doing the calculations in excel then manually entering. Thank you! Share this post Link to post Share on other sites
peterB 322 Posted May 18 solution of 2024 here https://open.substack.com/pub/traderpeter/p/das-trader-advanced-hotkeys-part-777?r=1wujo4&utm_campaign=post&utm_medium=web 1 Share this post Link to post Share on other sites