Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/05/2021 in Posts

  1. 1 point
    Hi Ywiratania. My modifications of Peter B's script are below. Remember this script is for Interactive Brokers. It will not work with other brokers. Also, make sure you use it in SIM first before going live so that you can be certain there is not a catastrophic error in the script that would lose you a lot of money. I cannot guarantee they will work for you. I will be testing the Market versions for myself Monday in SIM. The portion that makes sure the Trigger order will create the Stop Orders is "Price=Round2;" added to the original script. The portion that changes the entry from a LIMIT order to a Market order, is by replacing "ROUTE=SMRTL;" with "ROUTE=SMRTM;". The portion that changes the Triggered Range Order from a LIMIT order to a MARKET order, is by replacing "STOPTYPE:RANGE" with "STOPTYPE:RANGEMKT". ------------------------------------------------------------------------------------------------------------------- Long LIMIT entry $100 risk with 1.5 to 1 stop range LIMIT exit CXL ALLSYMB;StopPrice=Price-0;DefShare=BP*0.975;Price=Ask-Price+0.00;SShare=100/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Ask+0.1;TIF=DAY+;BUY=Send;DefShare=200;Price=Ask-StopPrice*1.5+Ask;Price=Round2;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS TIF:DAY+; ------------------------------------------------------------- Short LIMIT entry $100 risk with 1.5 to 1 stop range LIMIT exit CXL ALLSYMB;StopPrice=Price+0;DefShare=BP*0.975;Price=Price-Bid+0.00;SShare=100/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Bid-0.1;TIF=DAY+;SELL=Send;DefShare=200;Price=StopPrice-Bid*1.5;Price=Round2;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS TIF:DAY+; ------------------------------------------------------------- Long MARKET entry $100 risk with 1.5 to 1 stop range MARKET exit CXL ALLSYMB;StopPrice=Price-0;DefShare=BP*0.975;Price=Ask-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+;BUY=Send;DefShare=200;Price=Ask-StopPrice*1.5+Ask;Price=Round2;TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS TIF:DAY+; -------------------------------------------------------------- Short MARKET entry $100 risk with 1.5 to 1 stop range MARKET exit CXL ALLSYMB;StopPrice=Price+0;DefShare=BP*0.975;Price=Price-Bid+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=200;Price=StopPrice-Bid*1.5;Price=Round2;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS TIF:DAY+; ---------------------------------------------------------------- Best, Russell Landwehr
×
×
  • 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.