Jump to content

RussWilliamL

Lifetime Members
  • Content Count

    47
  • Joined

  • Last visited

  • Days Won

    9

RussWilliamL last won the day on December 20 2023

RussWilliamL had the most liked content!

Community Reputation

21 Excellent

1 Follower

Recent Profile Visitors

1,915 profile views
  1. Could you help me set this script to “risk 1R to make 1.25R”  so either I lose 1R or profit 1.25R?  thx in advance.

     

    Short

     

    CXL ALLSYMB;

    $buyprice=Bid;

    $risk=69;

    $mystop=price;

    $pricetostop=$mystop-$buyprice;

    $target=Bid-$pricetostop-$pricetostop-$pricetostop;

    $amount=$risk/$pricetostop;

    ROUND2;

    StopPrice=$mystop;

    SShare=$amount;

    Share=$amount;

    TogSShare;

    ROUTE=LIMIT;

    Price=$buyprice;

    TIF=DAY+;

    SELL=Send;

    TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:$target HighPrice:$mystop ACT:BUY QTY:POS TIF:DAY+;

     

    Long

     

    CXL ALLSYMB;

    $buyprice=Ask;

    $risk=69;

    $mystop=price;

    $pricetostop=$buyprice-$mystop;

    $target=3*$pricetostop+Ask;

    $amount=$risk/$pricetostop;

    StopPrice=$mystop;

    StopPrice=ROUND2;

    SShare=$amount;

    Share=$amount;

    TogSShare;

    ROUTE=LIMIT;

    Price=$buyprice;

    Price=ROUND2;

    TIF=DAY+;

    BUY=Send;

    TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:$mystop HighPrice:$target ACT:SELL QTY:POS TIF:DAY+;

  2. Hi Russ, can i bother you again on writing another script?  If not i understand, but if so.  Can a script be created for 3 to 1 but sell/buy (create script for both ways) 33% at 1R and sell/buy remainder at 3R?

    1. RussWilliamL

      RussWilliamL

      heya, sorry for the late reply,  I haven't checked in for a while.

      Do you still want me to have a go at that script?

      One of the problems with exit scripts is that with percentages, they often don't add up to the proper shares of the position.  There are ways around it depending on what exactly you want it to do.

    2. meatskin2000

      meatskin2000

      You have helped me in the past, so I have another question for you.  I want to switch over to using 1% of my account instead of using fixed risk.  I was going thru the “bbt.dastraderpro_hotkey_config-V2”  and I tried them but I’m confused how it suppose to work b/c, I don’t know if my account is margin x4, if so how do I calculate 1% of my balance.  So when I took a trade in sim, I still couldn’t figure out if I just used 1% of my account.  Also I didn’t get the auto SL/TP flags.  I thought maybe you used %risk and could lead me in the right direction.  If you can help I appreciate if not I still appreciate what you done before. 

  3. 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
  4. 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
  5. 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)
  6. 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)
  7. 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
  8. 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
  9. If the StopLoss was hit, this order should exit 50% of your position then send the Trigger order for the remainder at AvgCost which would then immediately execute to exit your position
  10. 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;
  11. 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.
  12. 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.
  13. What is this witchery? This is the first I've seen "SwitchTWnd". I've been using "FocusWindow MONTAGE1" since my montage window is named MONTAGE1.
  14. 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.