Jump to content
KyleK29

DAS - Dynamically Calculate Shares on %Risk or $Risk - Hot Key + Configuration, Updated 9/10/19, v2.1

Recommended Posts

On 10/28/2020 at 3:28 PM, Terrence McIntyre said:

@KyleK29 Hey Guys, I'm trying to set a hotkey with a set $ risk vs a % risk.  What I have so far is a trigger order hotkey that determines the amount of shares that I can purchase with $250 and that sets a stop loss for a percentage of that amount.  What I'm looking for is a trigger order that calculates how much shares I can get with a set amount of money then set a stop loss for a set amount of money vs a percentage if that makes sense.

ROUTE=NSDQL; Price=Ask;ACCOUNT=TMCME9043; Share=250/PRICE;TIF=DAY+; BUY=Send;TriggerOrder=RT:STOP STOPTYPE:MARKET STOPPRICE:AvgCost2*.90 ACT:SELL QTY:POS TIF:DAY+

That's exactly what this thread is about. On the first page you can go download Kyle's hotkey spreadsheet; it's all in there. And there are training videos at the bottom of the post.

Share this post


Link to post
Share on other sites

@Justin Prior to posting my question I checked out the spreadsheet and attempted to figure out how to use it for what I'm trying to do.  Along with looking at the videos multiple times prior.  I also viewed it again after your response.  I'm still having difficulty figuring out how to do what I'm trying to do.  It appears the solution that the spreadsheet along with the video solves is one of trading visually on charts with an automatic percentage or dollar stop loss.  Where the user can click on the chart for where they would like the stop to be and trade goes through with the appropriate amount of shares and risk(percentage or dollar). 

I use another program for my charts and would like to only use the hotkeys .  Also I would like to figure out how not be maxed out at a account risk of 5% which is in the spreadsheet or a way to use a maximum of $250 per trade.  For that I suppose Share=250/PRICE would work but with the number of times the Share variable is used in the script I don't know where to place it or if it will work.   

Thanks for responding and all your help  

Share this post


Link to post
Share on other sites

Is there a script to automatically put a stop loss lets say $100 away from an entry after I am already in the trade with share size that I selected. So if I have 100 shares it will put the stop $1 away. if I have 200 shares it will put the stop 50 cents away. 

Share this post


Link to post
Share on other sites
On 9/28/2018 at 8:37 PM, KyleK29 said:

Updated: 8/8/2019 @ 12:44pm (PST)

Finally out of the alpha stage and releasing this to the community, I've been using it with success. Because I had to do some musical chairs with memory I made a configuration utility as the script itself is very ugly.

This is more of a BETA release for this, so if anyone wants to try this out in SIM and let me know if you have any issues with the configuration sheet or the hotkeys themselves. It's based on the work started by @fjmocke here: https://forums.bearbulltraders.com/topic/469-das-calculate-shares-based-on-account-risk/ . 

What it is:

It's a hotkey command script that can be used to dynamically alter the share total based on:

  • Available Buying Power (capital)
  • Stop Location (Risk)
  • % Account Risk OR Fixed Dollar Amount

The script includes purchase power protection and won't send an order that you can not afford, it does this by calculating two factors:

A - Shares You Can Afford
B - Shares at Risk Parameter (e.g. $25,000 account equity, 1% risk = $250 risk, $250 * a stop distance of .10 = 2500 shares)
min{A,B} = 0.5(A + B - | A - B | )

But, why male models?

I just told you. /Zoolander reference

You'd use this to calculate your share total based on what you're willing to risk. So instead of blindly throwing 500 shares at every setup, you can dynamically alter risked amount based on the per-trade setup. I use it on my StreamDeck (will also release the icon packs soon) with modifiers of 100%, 75%, 50%, and 25%. 100% is the A-Plus setups I see, those I have HIGH confidence in. Alternatively, if a stock has a large spread or is low-float, I may only use the 25% modifier key for those.

Instructions for Configuration:

  1. Go to this link:
    V2.1: https://drive.google.com/open?id=1TJy7jRHhdMYGyyfKbbYd3M7j6bqxgeoy
    ^^ Recommend latest DAS version of 5.4.3.0. Requires DAS version 5.2.0.34 or above (current BETA branch as of 11/19/2018) for the physical stop portion to work. If you don't use the physical stop, you don't have to worry about it.
  2. NOTE: Thoroughly test in SIM to make sure it's doing what you expect it to do.
  3. Choose: Download the ZIP file and unzip to where you want.
  4. On "Setup & Instructions" configure your settings.
    1. Account Leverage (default for DAS is 4), this is the margin your broker gives you. Some off-shores give 6. It needs to match what is configured in DAS for proper calculations.
    2. Max Account Risk %. This is the maximum percent of equity you're willing to risk on every trade (default is 1%). You can always risk lower (more on that later).
    3. % of Total Buying Power. If you don't want to calculate based on the total buying power of 100%, you can set this to a lower percentage (example: 100,000 buying power with 60% here equals $60,000 maximum position size)
    4. Route. LIMIT, MARKET, SMRTL. Default is LIMIT.
    5. Order Bid/Ask Offset. This is the offset you use when you send the price for order, e.g. "Ask + 0.05" (meaning fill me up to 5 cents above ask)
    6. Time in Force. Default: Day+
    7. Default Shares. This is the amount of shares you want to set as the DEFAULT SHARES for all trades (e.g. when you click a Symbol and it loads,  this is the share total). You can see why this is here in the technical breakdown section below.
    8. Minimum Stop Buffer. This is an offset to the stop distance. If you set this to 0.05, it'll add 5 cents to the stop distance calculation (so if your stop distance is 0.05, it'll be calculated on 0.10).
  5. Switch to the "Hotkeys" tab.
  6. Choose your preferred style. % Risk of Equity (Dynamic) or Fixed Price (e.g. $150 risk).
    1. %Equity Risk: Use the drop down to select what you want the value to be % equity. NOTE: This is a modifier AFTER your account risk maximum %. So if you have 1% account risk, and set this to 50%, your effective account risk is 0.005 --> 0.5%.
    2. $ Fixed: Use the drop down to select what you want the value to be for dollar risk.
    3. Select "long" or "short" to flip the script's direction.
    4. Click the cell that contains the start of the command (E column) and Ctrl + C (copy). Paste it into DAS. It should look like a sample command below.

Instructions for Usage:

  1. First, you must have "Double Click to Trade" turned on in Chart, Right-Click --> Configure --> Settings --> Double-click to trade.
  2. Double click the chart where you want to set a mental stop (it does not place a stop order, you can always put one in after).
  3. Hit your configured hotkey.

 

Sample Scripts:


LONG:

DefShare=BP*0.98; Share=DefShare*0.25* Price * 0.01; Price = Ask - Price + 0.02;SShare = Share / Price; Share = DefShare - SShare; DefShare = DefShare + SShare; SShare = Share; SShare = DefShare - SShare; Share = 0.5 * SShare; TogSShare; ROUTE =LIMIT; Price = Ask +  0.05; TIF=DAY+; BUY=Send; DefShare = 500;

SHORT:

DefShare=BP*0.98; Share=DefShare*0.25* Price * 0.01; Price = Price - Bid + 0.02;SShare = Share / Price; Share = DefShare - SShare; DefShare = DefShare + SShare; SShare = Share; SShare = DefShare - SShare; Share = 0.5 * SShare; TogSShare; ROUTE =LIMIT; Price = Bid - 0.05; TIF=DAY+; SELL=Send; DefShare = 500;

 

Technical Breakdown:

DAS has basic scripting. Montage commands have access to very few read/write variables, basic operations, and only operators of addition, subtraction, division, and multiplication.  To do this calculation we need additional operators (min function, and absolute function) and more memory for storage of variables. 

This command gets around these limitations by using user-writeable areas of memory in the program. Since DAS is written in the C++ language (from what I can tell), it's strict on what can be done in these existing memory locations. The hotkey uses the following items (plus the usual Price -- FLOAT):

(Assumptions on Datatypes)
DefShare -- INT (Used as a temporary variable for storage)
SShare -- Unsigned INT (Behaves like an Unsigned INT in certain situations. Used as a temporary variable for storage)
Share -- INT (Used as a temporary variable for storage)

With the 3 INT variables, objects are moved around in memory so that we can calculate and compare with our variable limitation (be much easier if we could assign our own). To facilitate the ABS() function, we use a trick --> When a negative value is placed into an Unsigned INT it loses it's sign (thus, it becomes a POSITIVE value in memory).

A more detailed technical breakdown (step by step) is located in the Configuration spreadsheet up above.

Future Enhancements:

  • If need be, I can make a step-by-step video of this entire process.
  • I have a version that uses an AutoHotKey macro to drop a line at the stop location, I can upload that as well if people want it.
    • ^^ Update, I discontinued this as it was too cumbersome. You had to have two sets of hotkeys for each command. I may someday revisit it if I can build out a configuration tool for it.

TLDR:

It does the math for you so you can risk a known amount (% or $) based on your per-trade risk position (stop distance). And yes, I'm a bit of a tech nerd.

Also, longest post .. ever. Would not read again, 0/5 stars.

---

KNOWN ISSUES:

  • %Account Risk gets smaller and smaller when subsequent open positions
    • Reason: No Equity variable, we reverse calculate equity using Buying Power. On subsequent positions, the % (e.g. 1%) calculation will be based on the available buying power and NOT the account equity.
    • Workaround: Precalculate the %risk and use it for the $risk versions. So 1% of $25,000 equity equals $250.
  • SSR rejection on LONG position when scaling out; rejection message (e.g. "Short marketable limit order disable due to SSR!") if using the automatic STOP trigger.
    • Reason: DAS calculates that the position will drop below the open stop order position and reject as this can cause the position to "flip" if it was triggered.
    • Workaround: Have a hotkey to clear the open orders (CXL ALLSYMB), clear it, scale the position (e.g. 25%). Either replace the stop or switch to a mental stop. Alternatively, you can add "CXL ALLSYMB;" to the front of the scale-out hotkeys. You just have to be cognizant to replace the stop order.
  • Equated position size if very small (e.g. 4 or 5 shares when expected is hundreds).
    • Reason: Wrong side was used for the order. E.g. a long hotkey is used when trying to go short. -or- Stop Distance was calculated to be a negative value (clicked too close to current price).
    • Workaround: Be cognizant of the hotkeys used and the stop distance clicked. Clicking too close (a really tight stop) can be very dangerous if you do it inadvertently.
  • TriggerOrder for automatic STOP placement not being sent (no stop order placed).
    • Reason: Montage is not set to a style that doesn't allow TriggerOrder input. Styles not compatible are: Default [DAS's, if you changed it], Basic, OCO, Option, Full
    • Fix: Use a style that is compatible, they are: Stop Order, Detail, Trigger  -- I recommended using the "Stop Order" montage style. To change this, right click the montage area around where you'd enter a price and select Style --> Your Choice.

---

UPDATES:

10/17/2018

- Added v.1.1 link, you'd need to use the new version to change anything.
- General cleanup of the script. Added instructions for the IB issue (discussed in this thread)
- NEW FEATURE: Added a new section to the Hotkeys sheet, it will now create a set up for Dynamic Scale-In hotkey commands.  You'd use these by setting a scale value (say you want an additional 50% of your current position size). The hotkey will calculate the maximum share you can afford (how much you can afford at the moment) and the scale value, choosing to take the least amount. So if your current position is 1500 shares (@ $50.00) and you want to scale in at 50% your current position, it'd check if you can afford an additional 750 shares, if you can't, it'll buy the maximum you can afford. For this example, you can't afford it (if Buying Power is 100k), so it'd buy roughly $25k worth (500 shares).
- CLEANUP: Cleaned up the $Dollar Risk version and removed unnecessary steps. Don't really need to replace yours if they exist, but worth noting.

10/30/2018

- Added @Michael P's suggested fixes for Excel. Configuration tool should now work in both Sheets and Excel.
- NOTICE: This was a configuration tool change, no changes were made to the hotkey scripts, so no need to change any existing hotkeys.

11/19/2018
- Shortened some of the commands so we don't hit any hotkey character limit, makes them less readable, but shorter. Couldn't get them low enough to fit the montage buttons though (although removing the portions for the buying power rejection protection would likely do it).
- Added a section for SELL/COVER buttons for people who just need to create those. E.g. "Sell 25% position" or "Sell 33% position".
- Added @Robert H's stop suggestion. New fields on the setup page for enabling physical stops. If enabled, it'll place a MARKET or LIMIT (settings included) trigger order to go into the market once the initial order is fulfilled, these are placed at the location you double-clicked on the chart.

11/20/2018
- Added a stop-order setting to set an additional buffer for the stop price (for those that want to include or exclude the double-clicked price).
- Added conditional formatting to subdue the stop settings that aren't required if you disable sending a physical stop into the market.

12/10/2018
- Added a known issues section to this post and the spreadsheet (for when a new version goes up).

12/12/2018
- Updated known issues section to include the "Montage Style" issue for TriggerOrders.

12/13/2018
- Updated to new version 1.46. Fixed a bug in the Trigger Order script which could cause it to not be interpreted by DAS's command parser on certain user settings.
- Added "modifier" extra hotkeys. See instructions next to these on how to use them.
- - - Set Stop to Breakeven - Long or Short - Stop Limit or Stop Market (cancels any pending orders for SYMB)
- - - Set Stop to Breakeven - Bidirectional - Stop Market (cancels any pending orders for SYMB)
- - - Stop - Update Price - Long or Short - Stop Limit or Stop Market (cancels pending orders, double click chart where you want stop before firing hotkey)
- - - Stop - Update Price - Bidirectional - Stop Market (cancels pending orders, double click chart where you want stop before firing hotkey)
- - - Stop - Update Position - Long or Short - Stop Limit or Stop Market - Replace (requires you double-click the original stop in the Orders window)
- - - Stop - Update Position - Bidirectional - Stop Market Orders Only - Replace (requires you double-click the original stop in the Orders window).

8/8/2019
- New version 2.0, download the .zip file and unzip it.
- Fixed an issue with some hotkey configurations that may have caused them to be inaccurate in vary rare situations. Recommend recreating your hotkeys in this new version, just to be sure.
- Added Profit Target hotkeys.
- Added % Scale-In Hotkeys
- Added $ Risk Scale-In Hotkeys
- Added Short-SSR to Long/Short dropdown for SSR hotkeys (DAS Simulator)
- Added Range Order hotkeys
- Added Y-Margin Scale Increase hotkey, Y-Margin Decrease, and Y-Margin Reset
- Added new sheet "Example - Equity%" and "Example - $Risk" to give a more workflow outlook on what is happening.
- Included a ScaleOut worksheet to manually simulate what different scale percentages / scenarios look like (instructions will be in the video).

ALSO: Video is done and rendering, I think it comes in at 45minutes with 3.4gigs (4k), so it'll need to be optimized before I upload it to YouTube. Will try to do it today and will update this when done.

9/10/2019
- New version 2.1 released. Just general clean up (UI) and bug fixes.
- FIXED: Issue with the Scale-In $Risk hotkeys. 
- FIXED: Issue with the Stop Update Price long and short hotkeys>
^^ If you use either of those, please regenerate them and replace in your DAS to avoid issues.

 

UPDATES:

The majority of this side project is completed and besides a few requests I have in with DAS developers to optimize a few things, out of any major bugs or improved scripting features, I'd say this is about done. I'll provide any edge-case support as need, but I want to move on to other BBT-community projects. So what do I have cookin' for you guys, gals, and cat?

You'll see a glimpse in the video of an early prototype (buggy! I programmed that in a few hours, so bugs are expected) of a DAS calculator side program. The newer version (need to finish the UI) will incorporate a lot more in ways of tools for you, including automatically calculating changes without a hotkey intervention. It also allows you to mass-process trade log .csv files you may have exported and compile it into Excel or .CSV for import into other programs. Configuration is drag/drop friendly, so rearranging your columns is as easy as click and holding.

I'm also going to shift my attention to finishing my ORB-strategy research. Right now, my datapool encompasses 15000 news article, gaplists for 2011-2019, and 1second data for stocks in that range. It's a data store of roughly 80 gigs. The idea is to test for hidden signals we may not see that can indicate a potential direction of an ORB strategy (if no rare outside influence occurs, like a terrorist attack) by leveraging a consortium of machine learning algorithms to give us a higher probability of success for each day. Depending how the research works out, the end product would likely be a probability predictor for each day. I'll share the research results with the community and may incorporate some other tests as well.

 

VIDEO:

Ok, so I may have gone down an editing rabbit hole and that took longer than expected. The videos are up, came in quite long so I chunked it down. Sorry it's a tad scattered and not one-linear cohesive unit, but I tried to mark it up as best as possible.


Part 1 - Config / Math - https://youtu.be/YrRrydwGyRY
Part 2 - Setup, Quick Examples, Tips - https://youtu.be/pXLlWF7T6hw
Part 3 - Sim Trade Example - https://youtu.be/SO9UhJh4dTc
Bonus 1 - Scale/Price Excel Calc - https://youtu.be/KTr_iJ2p0TU
Bonus Tips - https://youtu.be/sNHXFMoia7A

Hi ,

I am using Kyle´s "das-dynamically-calculate-shares-on-risk-or-risk-hot-key-configuration-updated-91019-v21" . I run and tested  it on the simulator and it worked as expected on all my tries .  Passed .

Now i had the greatest shock when i used it on a market open live sessions , most of the time, it did not work as expected and i end up blowing my 30k account .  😞

This is my observation 

1. The "das-dynamically-calculate-shares-on-risk-or-risk-hot-key-configuration-updated-91019-v21 " worked well on the simulator as expected . Any clue why it did not work on Live sessions ??

2.  "das-dynamically-calculate-shares-on-risk-or-risk-hot-key-configuration-updated-91019-v21" worked well on pre-and-post market sessions , but NOT during market open sessions . 

Basically , it fails during market open sessions .

3.  The Stoploss , trailing stops and range does not worked during market session .  Basically , it gets triggered and vanishes from the montage but does not STOP or exist my Trade .

Questions

1. Am i missing some configurations and settings  that is causing the program not to work as expected during market open sessions , please advice  .  Any explanations why it works on the Simulator well and not on the Live program and session ? Please advice .  

2. Short selling is almost impossible during market open sessions, regardless of the amount of BP in my account . 

3. I did change from IBKR to CMEG  lately , and wondering if there are special settings to use while using the CMEG dasTrader Pro ? 

4. Is the version "das-dynamically-calculate-shares-on-risk-or-risk-hot-key-configuration-updated-91019-v21" the current or out date version ? Please advice 

5. Should there be any information that you might need to troubleshoot please do let me know ? 

6. As i do not want to blow up another 30k USD in the future again , Please do share with me all input that i need to use the great kyle das-dynamically-calculate-shares-on-risk-or-risk-hot-key-configuration-updated-91019-v21"  successfully in the future ? 

Share this post


Link to post
Share on other sites
36 minutes ago, peterB said:

first of all sorry to hear about the blowup but we are honest here so the blow up has nothing to do with the hotkeys. you need to accept that. and you need to stop doing the wrong things and decisions which made you the loss.

 

observations

1. depends on your broker, there are some route specifics mentioned in this topic so i wonder you did not know.

2. actually it is the other way around as during pre and post market the market orders do not work - this is by design, nothing to do with hotkeys or DAS

3. best if you share the very specific case which you describe that does not work

 

q&a

1.  you use the same broker for the demo account and live account or you use DAS demo and broker account for live trading?

2. short selling depends on the availability of the shares to be borrowed to you from the brokers customers

3. yes there are. route for IBKR is SMRTL and LIMIT for CMEG also TIF is DAY+ for IBKR if you want the order to be valid for premarket and postmarket while DAY is only for market open sessions. in CMEG there is only TIF DAY for all trades.

4. in the first post of this thread is the always latest link to download. i do not believe you have a problem with the excel sheet

5. post your hotkey.htk file and describe what is wrong and when. follow what is written in the file to setup your DAS

6. setup risk controls! max daily loss at least at your broker. in CMEG you need to write them to set it up for you. trade with max $10-$20 risk per trade and use the static risk hotkey from the file. do not expect to be profitable the following 6-24 months. do not trade with the attitude you need to make it back as it is most probable you will not be able to do so in the next few months.

Thanks for your quick response , i really appreciate it very much . I will double check and follow your suggestions above . Thanks 

On the fly, apart from Step 6 ( set up risk control with CMEG ,) i think i do have every thing in place, not 100% sure though . 

Attaching sample of my long and short scripts, maybe you could assist spot the missing parts or my mistake  

Long scripts
DefShare=BP*0.75;Share=Pos;SShare=Share *0.25;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price= Ask+0.05;TIF=DAY+; BUY=Send;DefShare=300;


StopPrice=Price-0.01;DefShare=BP*0.75;Price=Ask-Price+0.01;SShare=40/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=300;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.02 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

StopPrice=Price-0;DefShare=BP*0.925;Price=Ask-Price+0.00;SShare=50/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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;


Short scripts

StopPrice=Price+0.01;DefShare=BP*0.75;Price=Price-Bid+0.01;SShare=40/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=300;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.02 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

DefShare=BP*0.75;Share=Pos;SShare=Share *0.25;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=bid-0.05;TIF=DAY+; SELL=Send;DefShare=300;

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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.05 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

Please do advice should i miss something . Will send my hotkey script as well if still needed. Thanks 

Share this post


Link to post
Share on other sites

The effort Kyle has put into this hotkey is seriously amazing... the detailed instructions, examples, videos.. so damn good. Thank you Kyle!

As I tested out the fixed $risk hotkey (v2.1.2) on Das Pro v5.5.2.1,  I ran into Script: Invalid Operator error and removing "$" symbol from the risk amount and stop order distance fixed the issue.  Just posting in case someone runs into that.

 

Best,

-Sol

Share this post


Link to post
Share on other sites
On 11/15/2020 at 7:24 PM, mlmpty01 said:

Thanks for your quick response , i really appreciate it very much . I will double check and follow your suggestions above . Thanks 

On the fly, apart from Step 6 ( set up risk control with CMEG ,) i think i do have every thing in place, not 100% sure though . 

Attaching sample of my long and short scripts, maybe you could assist spot the missing parts or my mistake  

Long scripts
DefShare=BP*0.75;Share=Pos;SShare=Share *0.25;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price= Ask+0.05;TIF=DAY+; BUY=Send;DefShare=300;


StopPrice=Price-0.01;DefShare=BP*0.75;Price=Ask-Price+0.01;SShare=40/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=300;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.02 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

StopPrice=Price-0;DefShare=BP*0.925;Price=Ask-Price+0.00;SShare=50/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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;


Short scripts

StopPrice=Price+0.01;DefShare=BP*0.75;Price=Price-Bid+0.01;SShare=40/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=300;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.02 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

DefShare=BP*0.75;Share=Pos;SShare=Share *0.25;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=bid-0.05;TIF=DAY+; SELL=Send;DefShare=300;

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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.05 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

Please do advice should i miss something . Will send my hotkey script as well if still needed. Thanks 

 

On 11/15/2020 at 7:24 PM, mlmpty01 said:

Thanks for your quick response , i really appreciate it very much . I will double check and follow your suggestions above . Thanks 

On the fly, apart from Step 6 ( set up risk control with CMEG ,) i think i do have every thing in place, not 100% sure though . 

Attaching sample of my long and short scripts, maybe you could assist spot the missing parts or my mistake  

Long scripts
DefShare=BP*0.75;Share=Pos;SShare=Share *0.25;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price= Ask+0.05;TIF=DAY+; BUY=Send;DefShare=300;


StopPrice=Price-0.01;DefShare=BP*0.75;Price=Ask-Price+0.01;SShare=40/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=300;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.02 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

StopPrice=Price-0;DefShare=BP*0.925;Price=Ask-Price+0.00;SShare=50/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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;


Short scripts

StopPrice=Price+0.01;DefShare=BP*0.75;Price=Price-Bid+0.01;SShare=40/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=300;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.02 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

DefShare=BP*0.75;Share=Pos;SShare=Share *0.25;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=bid-0.05;TIF=DAY+; SELL=Send;DefShare=300;

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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.05 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

Please do advice should i miss something . Will send my hotkey script as well if still needed. Thanks 

Finally i got a break through . My hotkeys are working perfectly as expected . Many thanks to Kyle and all . 

Basically , i implemented all the suggestions in the forum , and it finally resolved my issue . Not sure exactly what did fix my issue but i know that my issue was not seen any longer when i have all these below 

Solution 

- Change route from  SMRTL-->  LIMIT 

-  Remove the Stop order distance  

Hope this simple fixes could save someone in the future from blowing up trading account .  

Share this post


Link to post
Share on other sites

Hi Kyle,

Is there a version of the dynamic hotkeys that will auto close the position once the target price for the reward is reached?

If it is already not in the script, then I think that is will be a high value add to that script..

If so, can you please consider including that into the hotkeys?

 

Thank you.

Share this post


Link to post
Share on other sites

Does anyone know if the Stop Orders attached to the Buy orders work in Replay mode in the Das Demo Simulator Version 5.5.2.1?  No stop orders are created. Montage Style is set to 'Stop'

Share this post


Link to post
Share on other sites

Hi Guys,

I just started using Kyle's Hotkeys, everything works except for the stop loss. When I double-click the chart and hit my hotkey the buy/sell order goes in but in doesn't send a stop loss. Does anyone have an idea why this is happening?

Share this post


Link to post
Share on other sites
9 hours ago, Diego Olivero said:

Hi Guys,

I just started using Kyle's Hotkeys, everything works except for the stop loss. When I double-click the chart and hit my hotkey the buy/sell order goes in but in doesn't send a stop loss. Does anyone have an idea why this is happening?

Solved!

The issue was that I didn't have the montage on "Stop Order" style

Share this post


Link to post
Share on other sites
On 12/8/2020 at 9:23 AM, mlmpty01 said:

 

Finally i got a break through . My hotkeys are working perfectly as expected . Many thanks to Kyle and all . 

Basically , i implemented all the suggestions in the forum , and it finally resolved my issue . Not sure exactly what did fix my issue but i know that my issue was not seen any longer when i have all these below 

Solution 

- Change route from  SMRTL-->  LIMIT 

-  Remove the Stop order distance  

Hope this simple fixes could save someone in the future from blowing up trading account .  

Can you elaborate on what "Remove the Stop order distance" mean? I am looking at my long script and it is the same as yours except the route part configured as per broker requirement. 

Share this post


Link to post
Share on other sites

Anyone use these hot keys, especially the ultimate hot key that puts in order, the market stop and the limit, With Cobra Trading and Das?

Runs fine on Cobra/Das training account on this edition but once switch to live orders the limit and stop don’t work.  Just creates a range order that never places a market or limit sell.

Thanks for feedback.

Mike, the Real Estate Investor and Day Trader

https://youtu.be/0hw59cB60os

Share this post


Link to post
Share on other sites

hi all

today and also yesterday I experienced some problems to enter right away with these wonderful hotkeys

 

I mean, I did press the button but the stock went higher without me (was nio today at the open): after some seconds, if it rebound I was in, otherwise trade gone!

 

I imagine is because there is a limit order in the script: but if this is the reason, can we switch to a market one? am I missing something?

 

I have to say also that I m using the hotkeys since last summer and these are the first problems... so maybe it s also this crazy market environment?

thx

 

Share this post


Link to post
Share on other sites
14 minutes ago, given81 said:

hi all

today and also yesterday I experienced some problems to enter right away with these wonderful hotkeys

 

I mean, I did press the button but the stock went higher without me (was nio today at the open): after some seconds, if it rebound I was in, otherwise trade gone!

 

I imagine is because there is a limit order in the script: but if this is the reason, can we switch to a market one? am I missing something?

 

I have to say also that I m using the hotkeys since last summer and these are the first problems... so maybe it s also this crazy market environment?

thx

 

 

It's the crazy market volatility, lots of people are having trouble with delayed fills this week as various brokers/exchanges have experienced increased traffic (and outages). It'll likely go back to normal soon. I had a couple delays myself, first time in 2+ years.

 

I wouldn't switch it to Market because you're really at the mercy of the market makers filling you at what price they feel like. Limit orders on entries are usually your best bet.


---------------------------------------------------------
Profile / Project Pages (Dynamic Hotkeys, StreamDeck Files, and other contributions are located here)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

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