We have moved to Discord. Please click here to join us in the Trading Terminal Discord server.
These forums are read-only.
Leaderboard
Popular Content
Showing content with the highest reputation on 06/08/2022 in Posts
-
1 pointI flipped the script on some hotkeys PeterB posted in another thread. PeterB's original Hotkeys were designed so that you could double-click your StopLoss Price. The Hotkey would calculate the Shares required based on your chosen $Risk, then after entering the position, a TriggerOrder would be sent that would be a Range Exit base on a Risk/Reward ratio of your choosing. In the Hotkey script, you would need to modify some lines depending on your Risk and your Risk/Reward target ratio. I found that I was better at predicting where a Price WOULD go (TakeProfitPrice) instead of where it might NOT go (StopLossPrice). So I modified PeterB's Hotkey script so that instead of double-clicking the StopLoss Price, I double-click my TakeProfit Price. The Hotkey script then calculates the correct number of shares required to achieve the $Profit, enters the position, calculates the StopLoss based on the Risk to Reward ratio I choose, then places a Range Exit order with my double-clicked TakeProfit Price and the calculated StopLoss Price. Here are the scripts for DAS Trader Pro with IB. Even though I've tested these Hotkeys (in SIM), YOU SHOULD TEST THEM IN SIM BEFORE GOING LIVE! Since the script is flipped, it is easy to end up with a StopLoss that is too tight if you aren't careful. Here are the 1:3 Risk/Reward scripts: MARKET LONG RISK $100, double click ProfitTargetPrice, get 1 to 3 RR MARKET Range Exit CXL ALLSYMB; StopPrice=Price+0; DefShare=BP*0.975; Price=Price-Ask+0.00; SShare=300/Price; Share=DefShare-SShare; DefShare=DefShare+SShare; SShare=Share; Sshare=DefShare-SShare; Share=0.5*SShare; TogSShare; ROUTE=SMRTM; TIF=DAY; BUY=Send; DefShare=10; Price=StopPrice-Bid/3; Price=Round2; Price=Ask-Price; TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:Price HighPrice:StopPrice ACT:SELL QTY:POS TIF:DAY; MARKET SHORT RISK $100, double click ProfitTargetPrice, get 1 to 3 RR MARKET Range Exit CXL ALLSYMB; StopPrice=Price-0; DefShare=BP*0.975; Price=Bid-Price+0.00; SShare=300/Price; Share=DefShare-SShare; DefShare=DefShare+SShare; SShare=Share; Sshare=DefShare-SShare; Share=0.5*SShare; TogSShare; ROUTE=SMRTM; TIF=DAY; SELL=Send; DefShare=10; Price=Bid-StopPrice/3+Ask; Price=Round2; TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:StopPrice HighPrice:Price ACT:BUY QTY:POS TIF:DAY; Here are the 1:1 Risk/Reward scripts: MARKET LONG Risk $100 double click ProfitTargetPrice, get 1 to 1 Risk to Reward MARKET Range Exit CXL ALLSYMB; StopPrice=Price+0; DefShare=BP*0.975; Price=Price-Ask+0.00; SShare=100/Price; Share=DefShare-SShare; DefShare=DefShare+SShare; SShare=Share; Sshare=DefShare-SShare; Share=0.5*SShare; TogSShare; ROUTE=SMRTM; TIF=DAY; BUY=Send; DefShare=10; Price=StopPrice-Bid/1; Price=Round2; Price=Ask-Price; TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:Price HighPrice:StopPrice ACT:SELL QTY:POS TIF:DAY; MARKET SHORT RISK $100, double click ProfitTargetPrice, get 1 to 1 Risk to Reward MARKET Range Exit CXL ALLSYMB; StopPrice=Price-0; DefShare=BP*0.975; Price=Bid-Price+0.00; SShare=100/Price; Share=DefShare-SShare; DefShare=DefShare+SShare; SShare=Share; Sshare=DefShare-SShare; Share=0.5*SShare; TogSShare; ROUTE=SMRTM; TIF=DAY; SELL=Send; DefShare=10; Price=Bid-StopPrice/1+Ask; Price=Round2; TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:StopPrice HighPrice:Price ACT:BUY QTY:POS TIF:DAY; Here is how you use the scripts: 1. Determine your Risk 2. Determine your Risk/Reward Ratio 3. Change two lines in each Script. The line that says "SShare=???/Price;" and the line that says "Price=Bid-StopPrice/?+Ask;" (or) "Price=StopPrice-Bid/?;" ---- the SShare amount will be your $Risk times the Ratio. For instance, if your Risk is $100 and the Ratio is 1:2, then you would place 200 for the amount. ---- in the Price portion of the script, you will place the number that corresponds with your desired R/R ratio. For example: 1 for 1:1, or 2 for 1:2. 4. Double-Click where you want to take profit 5. Activate the Hotkey. I hope some people find this helpful. Best, Russell Landwehr
