Jump to content

RussWilliamL

Lifetime Members
  • Content Count

    47
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by RussWilliamL


  1. Just to confirm, the proper order is:

    1. double click the StopLoss price

    2. hit the entry button (order fills)

    3. hit the exit button (without clicking on anything)

    4. go for a swim in the pool

    5. come back later and count your money

     

    I'm glad to give back to the community. (and programming hotkeys is fun!)

    Good luck!

     

    Russell

    • Like 2

  2. Okay, I've got some HotKey Scripts for you to TRY OUT IN SIM.  (never test things live)

    Each trade has two HotKeys. 

    The first one is the entry order where you double-click your Stop-Loss point.  (I basically just removed the TriggerOrder from your HotKey Script and moved it to my Exit Script)

    The second one is the exit order which you would place immediately after your entry order is completely filled.  Don't double-click anything between the "fill" and when you activate the Exit HotKey because it gets it's calculations from your Entry HotKey.

    Here is what the Exit HotKey does:

    1. places a one-share RangeMarket order with a 1R/1R range.

    2. Triggers a remaining-shares RangeMarket order with a 3R/BE range.

    There is no other way to do what you want (as far as I know) without the tiny one-share order to trigger the Stop-Loss move to B/E.

    With these HotKeys, this is what "should" happen (and it worked for me in SIM today).  If your 1R Stop-Loss is hit, the Trigger order exits your WHOLE position "near" your target Stop-Loss.  If the 1R profit point is reached, you will exit one share, then the Trigger order will be sent so that you will either profit 3R or B/E on the remaining position.  (You could change the exit orders to exit more of your position at 1R if you want to use these HotKeys to "partial" at 1R... something like Share=POS*.5 or Share=POS*.33 with your Trigger order remaining Share=POS)

    Be aware, the first exit order of one share will cost you about $1 in fees more per trade if you are with IB.  (I mistakenly said $2 earlier)  (Fees are no longer a danger when your orders are more than 200 shares)

    Here are the Scripts, you should be able to copy-paste them directly into your HotKeys.

    LONG ENTRY

    CXL ALLSYMB;
    StopPrice=Price;
    DefShare=BP*0.975;
    Price=Ask-Price+0.00;
    SShare=25/Price;
    Share=DefShare-SShare;
    DefShare=DefShare+SShare;
    SShare=Share;
    Sshare=DefShare-SShare;
    Share=0.5*SShare;
    TogSShare;
    ROUTE=LIMIT;
    Price=Ask+0.1;
    TIF=DAY+;
    BUY=Send;
    DefShare=200;
    Price=Ask-StopPrice*3+Ask;

    LONG EXIT

    CXL ALLSYMB;
    Route=STOP;
    StopType=RangeMKT;
    LowPrice=StopPrice;
    HighPrice=AvgCost-StopPrice+AvgCost;
    Share=1;
    TIF=DAY+;
    Sell=Send;
    TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:AvgCost HighPrice:Price ACT:SELL QTY:POS TIF:DAY+;

    SHORT ENTRY

    CXL ALLSYMB;
    StopPrice=Price;
    DefShare=BP*0.975;
    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=LIMIT;
    Price=Bid-0.1;
    TIF=DAY+;
    SELL=Send;
    DefShare=200;
    Price=StopPrice-Bid*3;
    Price=Bid-Price;

    SHORT EXIT

    CXL ALLSYMB;
    Route=STOP;
    StopType=RangeMKT;
    HighPrice=StopPrice;
    LowPrice=AvgCost+AvgCost-StopPrice;
    Share=1;
    TIF=DAY+;
    Buy=Send;
    TriggerOrder=RT:STOP StopType:RangeMKT LowPrice:Price HighPrice:AvgCost ACT:BUY QTY:POS TIF:DAY+;

     

     

    Hope this helps,

    Best,

    Russell Landwehr

    • Like 2

  3. i'm looking through these hotkeys...

    is there a reason you are entering with a LIMIT order?

    do you get filled every time?

    Are you using Interactive Brokers?

    (I think I have some HotKeys for you.  I'm going to test them in SIM tomorrow before I post them)


  4. 57 minutes ago, meatskin2000 said:

    Hey, Russ.    I like to use the analogy get in a trade and walk away.  The question I have for you, do you know if you can get a script to move to b/e after getting to first target. Similar to the first question, Patrick asked. But your response,  I think you was saying you have to move your stop manually and not auto.   That's what I have to do now, I want to be able to get in a trade, auto move stop to b/e at 1R then get out at 3R or b/e. Thx in advance.  

    Heya,

    I replied to your new post about this (after i got an email notification that you'd replied here, otherwise i wouldn't have seen it)


  5. Would you post the script you are using for your entry?

    I think there might be a way to do this.  It would require you to place (immediately after entry) a one-share (Shares=1) range order at 1R/SL with a remaining position (Shares=POS) range trigger order set for 3R/BE.

    Of course you would be throwing away about $2 in fees every trade for the convenience of being able to walk away, and one of your shares would only profit 1R.  Also if the one-share order hit your stop before making it to 1R, there would be some extra slippage while the POS trigger order executed and stopped you out.

     

    Russell


  6. Here is a Hotkey Script that will buy a Fixed Number of Shares at Market (for a LONG position) when the price gets to a certain price above the current price.  You must double-click the price where you want to place this STOP order.  (NOTE: you must also have your MONTAGE WINDOW STYLE set to "Stop Order". )

     

    CXL ALLSYMB;
    Route=STOP;
    StopPrice=Price;
    StopType=Market;
    Share=10;
    TIF=Day;
    Buy=SEND;

     

    Here is the version of the script for entering a SHORT position.

    CXL ALLSYMB;
    Route=STOP;
    StopPrice=Price;
    StopType=Market;
    Share=10;
    TIF=Day;
    Sell=SEND;

     

    HTH,

    Russell Landwehr


  7. You could make the first order a Range Stop order, but you would need one script for LONG positions, and a different one for SHORT positions.

    After you are in a position, double click your profit target then activate the hotkey.  Once the Range Stop is in place, move your StopLoss portion of the Range Order to where you choose.

    Try these (IN SIM FIRST!!) and see if they do what you want. (if you want a different risk to reward ratio, you can  change the /1 to a /2 or /3 or whatever you choose)

    FOR A LONG POSITION

    CXL ALLSYMB;
    Route=STOP;
    StopPrice=Price-AvgCost/1;
    StopType=RangeMKT;
    HighPrice=Price;
    LowPrice=AvgCost-StopPrice;
    Share=POS*.5;
    TIF=DAY;
    Sell=Send;
    TriggerOrder=RT:STOP StopType:Market StopPrice:AvgCost ACT:Sell QTY:POS TIF:DAY;
     

     

    FOR A SHORT POSITION

    CXL ALLSYMB;
    Route=STOP;
    StopPrice=AvgCost-Price/1;
    StopType=RangeMKT;
    HighPrice=AvgCost+StopPrice;
    LowPrice=Price;
    Share=POS*.5;
    TIF=DAY;
    Buy=Send;
    TriggerOrder=RT:STOP StopType:Market StopPrice:AvgCost ACT:BUY QTY:POS TIF:DAY;

     


  8. On 3/31/2023 at 2:12 PM, natelockett said:

    I am wondering if there is a way to Use the Hotkeys for Price targets based on R multipliers and still have the stop loss from the equalized risk in place. When I try to do this I get an Error. 

    I'm guessing you are talking about having a Trigger order that is a Range Stop order where the high and low are calculated on R.


  9. On 3/31/2023 at 2:12 PM, natelockett said:

    is there a way that when My first target gets hit, lets say 25% of my position gets sold at 1R can I then move my stop order to breakeven based on what I have profited already? Thank you for this as the tool is incredible!

    In order to do this, you would need two trigger orders.  The first trigger order would be a range stop order for 25% of your position and then the second would be the standard stop order for 75% of your position.  After the Range Stop is triggered, you can manually move the regular stop to break even.

    There is a problem with this, though.  If your dynamically calculated position is an odd number of shares, the 25% and 75% would not equal your complete position.  In that case, you would need to manually change one of the orders.


  10. On 12/4/2021 at 1:27 AM, Ywiratania said:

    Hi Russell.

    I'm new in trading and still using sim. I'm facing the same random problem that the Trigger order would flow. May I know the hotkey script from Limit to Market both for long and short?

    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

    • Thanks 1

  11. I just found a problem with Range orders.

    It places a Market Stop on the loss side, but a Limit Order on the profit side.

    Friday, SQ tickled my profit target and sent the Limit Order, but the Limit Order didn't get filled.  Meanwhile, the Stop Market order portion of the Range was cancelled.  THEN the price dropped BELOW my previous 1R Stop Loss part of the Range order, but the Stop wasn't there to catch it.

    Luckily SQ came back up and filled the Limit Order.

    However, I'm concerned.  Now I'm considering NOT using Range orders as part of my Exit Strategy. 

    Well, first I'm going to look into the "risk controls" page in DAS.  Perhaps I can set a control that will catch this problem on a per-position basis.  OR... maybe use that risk control as my 1R Stop, and just set a profit-taking TriggerOrder... just thinking out loud now.

     

    2021-08-27 sq.png


  12. 21 hours ago, NikkiB said:

    For me - not necessarily 1.5R, but some R, and being able to try it with a .5 increment is incredibly helpful.  I am finding that taking smaller R's and having a higher win rate is more beneficial to me so far.

    ETA - And yes, all or nothing most of the time.  I find I start partialling out too much and end up wasting my money on commissions.

    I'm with you on that.  In every back-test I've done, partialing has come out low on the ROI list, and the commissions are important to consider.

    Of course, with higher share size, the commissions aren't quite as impactful.

    • Like 1

  13. 3 hours ago, peterB said:

    just curious why do you need a 1.5 R/R target?

     

    Hi Peter B,

    I'm developing a strategy that fits my personality and methods.  The strategy is based on the 5-min ORB.  After back-testing the strategy, I found 1.5R profit was my sweet-spot.

    At 1.5R profit, a 40% win-rate is break-even and a 50% win-rate is my target; with an expectation of about a 60% win-rate.  

    A 50% win-rate returns 0.25R profit per trade.  A 60% win-rate returns 0.50R profit per trade.  For myself (a beginning day-trader) the conservative 1.5R/R  reduces the "pressure". 

    I expect to increase the win/loss ratio once I'm better at picking the right stocks to trade. (my back-test yielded a 63% win-rate)

    This "conservative" strategy fits my personality, methods, and goals. 

    In the past I was swing trading successfully using an extremely conservative method.  A friend of mine, who's been trading much longer than I, said, "but you're leaving so much money on the table!"  So I let him get in my head and I changed my strategy... and turned a winning strategy into a losing one that I was unable to bring myself to "reset" to my original strategy. 

    I don't need to make a "killing", only this steady ROI to meet my targets.

     

    All the best,

    Russell Landwehr

    • Like 1

  14. On 8/11/2021 at 3:52 AM, peterB said:

    if you want to change the target just rewrite the StopPrice*2 to StopPrice*X (where 2 is 2R)

     

     

    I ran into a problem when I changed the target to 1.5 (instead of an even number)

    (I also changed the script to a market entry instead of limit)

    anyway, the problem:

    Randomly the TriggerOrder wouldn't flow.  It wouldn't give an error or anything, it just wouldn't show up.

    I fixed the problem by adding Price=Round2; after the StopPrice*1.5;  (and also in the same place on the Short version of the script)

    Now the TriggerOrders execute smoothly every time.

     

    Best,

    Russell Landwehr

    • Like 2

  15. I like to create custom spoken alerts using Amazon's Polly.  (my favorite voice is Emma).

    My most recent custom alert audio (and new favorite) is attached as an mp3. 

    If you want to add it to your alerts, you will need the WAV file which is located here:  DOWNLOAD "STOP TRADING" ALERT WAV

    Then place the WAV file in your DAS main folder and set up your alert as shown in the attached screenshot.

     

    Russell Landwehr

    alert setup 1.png

    Stop Trading alert.mp3

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