Jump to content

tamago168

Lifetime Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

709 profile views
  1. Hi Justin, I found that IB only has this .tlg file the next day. Are you seeing the same? If true, this is an drawback as we'd like to finish the jounaling the same day after markets close. Thanks.
  2. This is for hedging. For instance, if I go short, I'm going long with 70% of short share size. So, if the short is going against me, I'm losing small. If it goes in my direction, I can hold longer by stretching my initial target to more aggressive ones (of course I still need to constantly evaluate price actions.) This enables me to trade without much stress. Loss is limited and potential gain is enormous.
  3. I mistakenly posted this topic in Tips and Tricks. I'm reposting my query here, which I think is the right place. --------------- I'm trading with two accounts, one hedges the other. I'm looking for a script to send a short order at Bid with $50 risk and 1.08 R target from one account; immediately after this is executed a long order to buy at Ask with $35 risk, SL is short target - $0.02, profit target is short SL - $0.02. Currently, I'm using the following script for the short order part: CXL ALLSYMB;ACCOUNT=Uxxxxx;StopPrice=Price+0;DefShare=BP*0.925;Price=Price-Bid+0.00;SShare=50/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=100;Price=StopPrice-Bid*1.08;Price=Round2;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS TIF:DAY+ When the short order is executed, I click another hotkey for the long order. The issue of having to click two separate hotkeys is that after the short order is filled, I have to select SL for the long, then hit the long hotkey. In the meantime, if the price goes down, it's in my favor. But if the price goes up, I cannot get a good fill on the long order. Therefore, I'd like to have one hotkey only to execute both orders at the same time (of course the short order HAS TO be filled first). If this is possible, it'll help a lot. Thanks!
  4. Hi Justin, For Short selling, is it possible to set trigger and sell limit prices above current price in Part 2 of the script? I slightly changed (in bold) Part 2 below, but it doesn't populate Trigger Price field. Only the Price field is filled with trigger price + the buffer. Is that theoretically possible as usually Sell Limit is set below the current price. DefShare=BP*0.97;Price=StopPrice-Price;SShare=25/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare; SShare=Share;Share=Price*100; Price=StopPrice; DefShare=Price*100; Price=Share/100; Price=StopPrice-Price; StopPrice=Price; Share=SShare; TogSShare; Price=Price+.05;TIF=DAY+;Route=Stop;StopType=Limit; Sell=Send; Share=DefShare;Price=Share/100; StopPrice=Price; DefShare=100;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+; The followings are my steps taken. #1. Set the stop price ($137.50) by using Part 1 script. #2. Set the trigger price ($136.95) by using Part 2 script. Currently, the stock is traded at $136.90. #3. Double click on the order sent, don't see Trigger Price. Price field is filled with trigger price $136.95 + buffer $0.05 = $137.00. Thanks a lot!
  5. I'm using the following script to short sell at the bid with $25 (1R) risk and covers 60% at 1R target with one key: CXL ALLSYMB;StopPrice=Price+0;DefShare=BP*0.925;Price=Price-Bid+0.00;SShare=25/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=100;Price=StopPrice-Bid*1;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS*.6 TIF:DAY+ Based on the above script, I think, hopefully, we can modify the syntax of Part 2 (reproduced below) to create a range order (High = Stop Loss and Low = Profit Target). I'm not a tech guy, so I need your opinions on this. DefShare=BP*0.97;Price=StopPrice-Price;SShare=25/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare; SShare=Share;Share=Price*100; Price=StopPrice; DefShare=Price*100; Price=Share/100; Price=StopPrice-Price; StopPrice=Price; Share=SShare; TogSShare; Price=Price-.02;TIF=DAY+;Route=Stop;StopType=Limit; Sell=Send; Share=DefShare;Price=Share/100; StopPrice=Price; DefShare=100;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+; I really need this hotkey, as at the opening, I'm sending multiple orders (if they meet my setup rules), and I can't manage if I have to manually modify the stop loss order created by Part 2 to be a range order. Thanks guys.
  6. Hi Peter, Ok, I'll workaround it by changing the script to send 60% at 1R, and manually send another 40% at 2Rs. Thank you for your time.
  7. Peter, I posted the same question under that topic, too. I saw you responded over there as well. It seems that currently there's no one key to accomplish this. So, the workaround for now is to send 60% at 1R, and manually send another 40% at 2Rs. Thank you for your time.
  8. Hi Kyle, I have been using your scripts for a while. They are very helpful! To make sure that you know what I'm referring to, I'm posting Short sell script below. This is the one with $25 fixed risk, and price target of 1.25R for full position. CXL ALLSYMB;StopPrice=Price+0;DefShare=BP*0.925;Price=Price-Bid+0.00;SShare=25/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=100;Price=StopPrice-Bid*1.25;Price=Round2;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS TIF:DAY+ Is it possible to have 2 separate price targets. Let's say, first one (60%) at 1R and second one (40%) at 2Rs? That will be very helpful if possible. Thank you very much! Henry
  9. Hi Justin, I think you were looking for a solution for Part 2 of the script to send 2 separate range orders. I'm looking for a similar solution like below. When my Buy Stop/Sell Stop is triggered and filled, 2 separate range orders are created. The first one is 60% of shares with 1R target and the second one is 40% with 2R target. Both of them have the same original stop loss. That'll be very helpful if a script exists for this case.
  10. Hi Justin & Kyle, This script is very awesome! Can you please provide the script for the flip side (i.e., Short situation)? Thanks Henry
×
×
  • 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.