Shared DAS Trader .das scripts and a canonical keymap.yaml, maintained for use with the DAS Hotkey Tools VS Code extension.
This repository contains human-readable DAS Trader hotkey scripts plus a keymap file that can be compiled into a DAS Hotkey.htk file. It exists to make large hotkey libraries easier to review, version, and share than editing Hotkey.htk directly.
These are the scripts I trade with on a daily basis. If you choose to use them, start by reading the user guide and then review the global settings in hotkeys/set_global_variables.das and the bindings in keymap.yaml (mine are tailored to my setup). I primarily use a Stream Deck.
Important constraints:
- Long-only.
- Assumes a single active symbol (multi-symbol trading is not supported).
- Requires a montage named
Primary_OE. - Requires installing
other scripts/timer.dasin DAS Trader's Timer Event Scripts. - Requires installing
other scripts/chart_1m.dasas a 1-minute Chart Script.
Read this first: USERGUIDE.md
These scripts can be manually copied and pasted into the DAS Trader script editor, or you can use the DAS Hotkey Tools to automate the process (see Requirements).
Note: The VS Code extension replaces %%SIMULATED%% and %%LIVE%% tokens when it builds the Hotkey.htk. If you copy scripts manually, replace those placeholders in SIM/LIVE switch and session scripts, and set $TRSIM/$LIVEACT in hotkeys/set_global_variables.das to your actual account identifiers.
Finally, please read the Risk Disclaimer section below and understand that you are using these scripts at your own risk and they are provided here purely for educational purposes.
Serious about day trading? You can find me on Discord here: https://discord.gg/UvZYTEGrvh
keymap.yaml- Hotkey metadata and key bindings.hotkeys/- Primary hotkey scripts.other scripts/- Supporting scripts or utilities.output.htk- Compiled output (generated by the build command; not committed).
- Tested with DAS Trader Pro 5.8.1.6
- DAS Hotkey Tools VS Code extension (https://github.com/madiver/dasVSide)
- DAS Trader Pro configuration (https://github.com/madiver/DASTraderConfig)
- Open this repo in VS Code.
- Ensure
keymap.yamlis present at the repo root. - Run
DAS: Build Hotkey File. - Use the generated
output.htkin DAS Trader.
- Scripts are plain text and safe to review in source control.
- The compiler is deterministic: the same inputs produce the same output.
- Use
// Ignore: Truein a script to exclude it from builds. - Use
// Group: <name>to tag a script's category (kept in sync with the section headers inkeymap.yamlfor easier organization). - With
$useTimerArming = 1(default), buy hotkeys return immediately after sending the order and the timer callsTimer Entry Handlerto arm stop/TP on subsequent ticks. If position size increases on later ticks, the handler re-arms the stop (cancels existing sells first) and re-arms TP only when the TP reset conditions are met. If no fill appears within$entryMaxTicks, the handler cancels the working buy order. Installother scripts/timer.dasin DAS Trader's Timer Event Scripts and keephotkeys/timer_entry_handler.dasin your keymap; set$useTimerArming = 0to revert to inline polling.
The DAS Hotkey Tools extension reads simple header tags from each script file.
These live in the first few comment lines of a .das file.
Example:
// BUY IB BID+ SL
// Group: Buy orders: Bid+ SL
// Ignore: TrueCurrent groups used in hotkeys/:
Buy orders: Ask SL, Buy orders: Ask+ SL, Buy orders: Bid SL, Buy orders: Bid+ SL,
Global controls & config, Sell orders: Ask, Sell orders: Bid-, Session equity &
PnL, Stops, Take profit, Utilities & toggles.
- Scale-ins are allowed only when the existing position is at least 1R in profit (dynamic R when active, otherwise
stopLossTrigger). - When adding to an existing long, the scripts use the scale-in-specific BE stop hotkey (
Set Auto Stop BE Scale 1/1). - Buy_IB scripts use an ice-breaker size that rounds to 5-share lots with a minimum of 5 shares.
- Projected risk caps are evaluated against net risk to the planned stop on total size after the add (current position + new shares).
- Controlled by
dynamicStopanddynamicStopMultinhotkeys/set_global_variables.das. - Dynamic R is based on spread at order send and is fixed for the life of the trade.
- Dynamic R is cleared when flat by the timer script (see
other scripts/timer.das). - Adaptive stop-limit offsets are used only when a dynamic stop is active; otherwise
$exitOffsetis used. - When
dynamicStop = 1, initial entries must usebuy_ib_*;buy_25_*andbuy_50_*are scale-in only.
These scripts are provided "as is" and are used at your own risk. Always review and test hotkeys before use in DAS Trader.
- I make no warranties or guarantees that these scripts are correct or bug free.
- Test changes in SIM and confirm order routes, share sizes, and risk controls.
- Hotkeys can place, modify, or cancel orders instantly; mistakes can be costly.
- You are responsible for compliance with broker rules, account settings, and regulatory requirements.