Sosa 0 Posted October 17, 2020 I've been using Kyle's dynamic dollar risk with a hard stop hot keys for the last couple months in sim and they have been working great. Recently as a part of a new edge I'm testing I'm scalping momentum around HOD/LOD breaks. I've been trying to set my scale out orders at the predefined R values given the hard stop I used to autocalculate the share size and enter the original position. Currently I trade all symbols from 1 montage and only trade 1 stock at a time. Below is the script I've been using for the scaling out from a long position at 0.5R/1R. It seems to work on the first trade of the day or the first trade in Replay mode and then it doesn't work and the price of the sell order is way too high and not accurate to my 0.5R or 1R target partial exit. I'm assuming it has something to do with the StopPrice field in the montage not updating? Does anybody have a recommended solution or fix? Long Position Sell 50% at 0.5R Route=Limit;Share=Pos*0.5;Price=AvgCost-StopPrice;Price=Price*0.5;Price=Price+AvgCost;Price=Round2;TIF=DAY+;SELL=Send Long Position Sell 50% at 1R Route=Limit;Share=Pos*0.5;Price=AvgCost-StopPrice;Price=Price*1;Price=Price+AvgCost;Price=Round2;TIF=DAY+;SELL=Send Share this post Link to post Share on other sites
KyleK29 257 Posted October 30, 2020 (edited) If the StopPrice in your montage changes, it will affect the calculation of the Stop Distance value (AvgCost - Stop Price). DAS does not provide any user defined variables for you to store the original Stop Price into, unfortunately. It's something that I discussed with them right before Covid hit, so hopefully they pick it back up once the pandemic is over. Edited October 30, 2020 by KyleK29 --------------------------------------------------------- ○ Profile / Project Pages (Dynamic Hotkeys, StreamDeck Files, and other contributions are located here) Share this post Link to post Share on other sites