Jump to content

Justin

Lifetime Members
  • Content Count

    477
  • Joined

  • Last visited

  • Days Won

    36

Posts posted by Justin


  1. 2 hours ago, peterB said:

    i am not sure but i think so. if not u can use the defshare variable for the calculation or any other non used variable from https://dastrader.com/documents/HotkeyCommandList.pdf

     

    Hmmm I don't think that's a thing then; but I'm going to reach out to the engineer I know at DAS - last I heard they were still working on it.

    And yes, I'm aware about defshare and the rest 😋 as you can see I used them in the hotkey I created in this thread.


  2. 7 hours ago, peterB said:

    i think you could use temporary variable instead of the parenthesis. like

    
    tempprice=Pos*AvgCost;StopPrice=tempprice-300

    i cant imagine a use case for this anyway. you will never get good stop loss like this you will be way off where you wanna be technically

     

    I was unaware that DAS added temporary variables. Is "tempprice" a specific command or can you name it whatever you want? Also, just curious when they added this...


  3. 16 hours ago, koreanwon97 said:

    I can't seem to use the hotkey for some reason. I keep getting "ERROR: Can't get valid price!"

     

    Edit: The hotkey only works for shorting, when I try to use the long hotkey it does not work at all. I copied the hotkey exactly as I saw it so I'm a bit confused on that...If there's a fix for that, please let me know. Also, when I try to use my cover or sell hotkeys, it does not work. It brings up this in the picture and I did manage to find a solution which was going into my montage and changing the type of order from "limit" to "market" and it worked. If there's another way to fix it without doing that, please let me know. I'm trying this in replay by the way.

    needhelp.PNG

    This hotkey doesn't work in replay mode. You'll need to test it out in SIM when the market is open.


  4. It's possible. What you're asking for is a range order.

    StopPrice=Price-0;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=10/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Ask+0.05;TIF=DAY+;BUY=Send;DefShare=400;Price=Ask-StopPrice*2+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS TIF:DAY+

    This will allow you to double click where you want your stop, enter a trade worth $10 (SShare=10/Price;) at the current price (it'll auto calculate the shares). And place a profit target at 2R (Price=Ask-StopPrice*2+Ask;)


  5. 9 hours ago, peterB said:

    you need to have Route=SMRTL for Interactive brokers

    No, not for stop orders @peterB.

    @justinstrommer9 It's either a syntax error from when you copied it into DAS or you're not executing the script properly.

    If you could outline a real example and step by step of exactly what you're doing that would be helpful. Like down to the detail. "I double click on the chart at x price, then hit the first hotkey. Then I double click on the chart at y price and hit the second hotkey."


  6. But wait! There's more! @Alastair @peterB

    I actually do have a hotkey that will place down R levels. It's a bit of a hack but it works! And being such a visual person, these are a godsend for helping me get to my R goals.

    The way it works is if you are in a position with a stop loss set, it utilizes your SIM account to place the target levels at 1R, 2R, etc.

    Look below - the green arrow is obviously my entry, and the blue arrow is my stop loss in my live account. And then when I hit the hotkey it will place two orders at 1R and 2R (orange arrow) with 1 share using my SIM account. Basically it does the math calculation for 1R and 2R, swaps the montage to my SIM account, places the orders, then puts the montage right back to my live account.

    The 1 share orders never get filled (I'm actually not sure why...), so as the price gets to the 1R and 2R markers you can take a partial or full exit, and it will be executed in your live account. After the trade is done just cancel the orders.

    image.png.9e408a7c94703dd4b057dfbba69a17d8.png

    Long

    StopPrice=AvgCost-StopPrice;Price=AvgCost+StopPrice;Share=1;TIF=DAY+;Route=Stop;StopType=Limit;Account=TRIBTXXXX;Sell=Send;Account=UXXXXXXX;StopPrice=StopPrice*2;Price=AvgCost+StopPrice;Share=1;TIF=DAY+;Route=Stop;StopType=Limit;Account=TRIBTXXXX;Sell=Send;Account=UXXXXXXX

    Short

    StopPrice=StopPrice-AvgCost;Price=AvgCost-StopPrice;Share=1;TIF=DAY+;Route=Stop;StopType=Limit;Account=TRIBTXXXX;Buy=Send;Account=UXXXXXXX;StopPrice=StopPrice*2;Price=AvgCost-StopPrice;Share=1;TIF=DAY+;Route=Stop;StopType=Limit;Account=TRIBTXXXX;Buy=Send;Account=UXXXXXXX

     

    • Like 5
    • Thanks 1

  7. 33 minutes ago, KyleK29 said:

    The way DAS works is it gets your leverage and the equity from the broker as a global value. BP is calculated off this global value.

    And to further make things worse... (at least from those on IB) The .dat file DAS gets from IB listing every stock's margin rate is wrong in many cases. DAS will show 100% margin rate when in actuality it's 300%.

    Last week I finally managed to connect someone at DAS support and someone at IB support to communicate to each other about the problem. And now "This issue remains under review." 🤷‍♂️


  8. 12 minutes ago, evan said:

    Could I have this trigger a market order instead of a range?  In other words, one the selected price is hit, I'm fine getting in at any price.

    Long

    DefShare=BP*0.97;Price=Price-StopPrice;SShare=20/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=Price+StopPrice; StopPrice=Price; Share=SShare; TogSShare; Price=Price;TIF=DAY+;Route=Stop;StopType=Market; Buy=Send; Share=DefShare;Price=Share/100; StopPrice=Price; DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

     

    Short

    DefShare=BP*0.95;Price=StopPrice-Price;SShare=30/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;TIF=DAY+;Route=Stop;StopType=Market; Sell=Send; Share=DefShare;Price=Share/100; StopPrice=Price; DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

     

    • Thanks 1

  9. 3 hours ago, juard said:

    And in the case of DAS SIMULATOR, to short position in SSR stocks WITH THIS EQUALIZED HOTKEY,  the hotkey must be at least BID+0,01. But in live with Interactive it can be a BID+0 because it convert auomatically the order into a smart order?

    That's correct - with IB it'll automatically tick up for your when a stock is on SSR.


  10. 3 hours ago, Ishyster said:

    Hello everyone. I appreciate any help if possible. After I get in a position and my stop is already in place I use these scripts to help scale me out.

    This really doesn't belong in this thread... but below works perfectly fine for me... The only change I made to your script was changing LIMIT to SMRTL for IB

    CXL ALLSYMB;Route=SMRTL;Share=Pos*.25;Price=Bid-0.05;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=StopPrice;Share=Pos-share;TIF=DAY+;SELL=SEND

    If you're not required to change your route with whatever broker you are using, I suspect it's simply a syntax issue. Re-copy and paste what I have in the text box above.


  11. @Ishyster

    Indeed the ; has no effect at the beginning of the scripts. If it's not separating anything, it's not doing anything.

    @Alastair

    Indeed putting CXL ALLSYMB in front of Kyle's default buy/sell script will allow you to double click again on the chart (where you want a new stop) and add to your position. It will recalculate your total POS and the new stop loss will be for all shares.

    • Thanks 1

  12. 3 hours ago, NickMan said:

    Hi chaps,

    I'm in SIM replay and can't manage to place a stop by double clicking. I've checked I have the latest das, double click is enabled on each chart, montage style is set to stop order. 

    My position type shows as margin.

    I'd add I'm clearly no IT wizz....

    Any ideas would be gratefully appreciated?

    Nick

    You can't use stop orders in replay unfortunately.


  13. 4 minutes ago, peterB said:

    you can do 1 and 2 in the same hotkey with DAS 🙂 but do you realize that doing that effectively cancels your range order so you don't need it?

    Yes, I think he's saying have this hotkey instead of the range. Like manually selling at 2R.

    This will sell 50% of your position at whatever the current price is. It will cancel your current stop, and move it to break even with the remaining shares (so you can't lose any more than you've gained),

    CXL ALLSYMB;Route=SMRTL;Share=Pos*0.5;Price=Bid-0.05;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos-share;TIF=GTC;SELL=SEND

     

    • Like 1

  14. @James00trades

    You can definitely do a 2:1 range order in the same "part-2" hotkey, but it would be a full exit at the stop loss and 2R.

    There is an alternative... But it's not great.

    In a 3rd hotkey (after you've entered a position), you can have it recalculate your position and place multiple range orders down at different price levels. Have a look below - one hotkey takes your full position (118 shares) and splits it between 5 range orders at 1R-5R. It's hard to see (as they are stacked on each other) but all 118 shares should stop out at the same price of 123.48.

    unknown.png

    Now I said "should"; here is the real problem with the script (also the main reason it's not released). Because your stop is actually 5 separate orders, in more volatile stocks you can have some bad slippage. It also can increase your commissions a bit (mainly on smaller positions).

    image.png.d8221a453c5c0d28024b2af81c3493b5.png

    I know Kyle has been working with DAS, I've been working with DAS.... If they simple can provide us with a few more variables, this stuff would be easy.

    • Like 2
×
×
  • 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.