Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/31/2022 in Posts

  1. 2 points
    I have been working today on 2 hotkeys for myself. The script(s) uses the defined R/R script from previous Kyles hotkeys. It performs the following: Cancels any previous orders for the symbol Enters the trade, ensuring total shares bought is equally divisible by 4 (rounded down); this prevents having extra shares hanging around after the range trades complete or stop out. Creates a range order at your stop level for 1/4 of your initial shares bought with a profit level of 2R Creates a range order at your stop level for 1/4 of your initial shares bought with a profit level of 3R Creates a range order at your stop level for 1/4 of your initial shares bought with a profit level of 4R Creates a single order at your stop for the remaining 1/4 shares; This allows you to ride the last 1/4 to whatever level you want before exiting As with Kyles hot key scripts, you double click your chart at the level you want to place your stop then press your button or hot key The Script for the long entry CXL ALLSYMB; StopPrice=Price-0.01;DefShare=BP*0.5;Share=DefShare*0.333*Price*0.01;Price=Ask-Price+0.01;SShare=Share/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=SMRTL;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=1000;Price=Ask-StopPrice*2+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;Price=Ask-StopPrice*3+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;Price=Ask-StopPrice*4+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos*.25 TIF:DAY+; and the Short CXL ALLSYMB; StopPrice=Price+0.01;DefShare=BP*0.5;Share=DefShare*0.333*Price*0.01;Price=Price-Bid+0.01;SShare=Share/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=SMRTL;Price= bid-0.05;TIF=DAY+;SELL=Send;DefShare=1000;Price=StopPrice-Bid*2;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS*.25 TIF:DAY+;Price=StopPrice-Bid*3;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS*.25 TIF:DAY+;Price=StopPrice-Bid*4;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS*.25 TIF:DAY+;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.3 ACT:BUY STOPPRICE:StopPrice QTY:Pos*.25 TIF:DAY+; Long $50 Risk CXL ALLSYMB; StopPrice=Price-0.01;DefShare=BP*0.5;Price=Ask-Price+0.01;SShare=50/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=SMRTL;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=1000;Price=Ask-StopPrice*2+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;Price=Ask-StopPrice*3+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;Price=Ask-StopPrice*4+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos*.25 TIF:DAY+; Short $50 Risk CXL ALLSYMB; StopPrice=Price+0.01;DefShare=BP*0.5;Price=Price-Bid+0.01;SShare=50/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=SMRTL;Price= bid-0.05;TIF=DAY+;SELL=Send;DefShare=1000;Price=StopPrice-Bid*2;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS*.25 TIF:DAY+;Price=StopPrice-Bid*3;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS*.25 TIF:DAY+;Price=StopPrice-Bid*4;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS*.25 TIF:DAY+;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.3 ACT:BUY STOPPRICE:StopPrice QTY:Pos*.25 TIF:DAY+; Everything prior to defshare=1000 in each script is completely from the original Risk/Reward Hotkeys except the bit of code that ensures the number of shares is equally divisible by 4. Feel free to give them a try and let me know if there are any issues.
  2. 1 point
    I will point out that this isn't necessarily new, I just wanted to figure it out for myself and my exact situation (I learn best that way). I know there are references in other posts to similar scripts (maybe even ones that do the exact same). If there is one out there, please don't assume this is plagiarized
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.