Peter’s Substack

Peter’s Substack

Share this post

Peter’s Substack
Peter’s Substack
DAS Trader Pro Advanced Hotkeys part 34
Copy link
Facebook
Email
Notes
More
DASTrader Hotkeys

DAS Trader Pro Advanced Hotkeys part 34

DAS Trader Pro can stop your overtrading

Peter Benci's avatar
Peter Benci
Feb 12, 2025
∙ Paid

Share this post

Peter’s Substack
Peter’s Substack
DAS Trader Pro Advanced Hotkeys part 34
Copy link
Facebook
Email
Notes
More
Share

I have a returning problem with overtrading and the standard risk controls do not provide this functionality, so I had to do some scripts that help me out with it.

For the start, we can see the statistics on how many trades were taken today by double-clicking the account number or by calling this command

showstatistics;

Also, we can read the number of executions from the account object.

GetAccountObj(YOUR_ACCOUNT_NAME).showobject()

The problem with the TotalExe count is that a simple trade with 2 entries for 20 shares and 1 exit can look like this

which counts as 9 executions. For that reason I am using the Alert to count the number of fills which is a more exact counter for trades. If you know a better way, please let me know in the comments.

We need to find the balance in the number of trades. For example, I know myself that if I am over 10 it is a dangerous zone. For you, it can be 5 or 30, depending on your style, but be honest with yourself.

Storing the number of trades filled into a variable

This is easy to be counted with a script. I will just add the relevant parts into my existing Order Fill alert that is doing my automated screenshots and my discord channel posting.

First I use the

savevartofile(trades);

to save the variables in case my DAS crashes and to make cheating one step harder as shutting down DAS Trader Pro and starting it back up will now remember the number of trades.

Then I save the number of trades into the $tradecount variable with

$tradecount=$tradecount+1;

Obviously, this way we need to manage the variable each day as it remembers the count from yesterday.

As my usual trades take 3–4 executions (2 entries+2 exits) I need to count 40 executions for the day.

Monitor the trade count variable

To be informed about the trade count reaching a certain level - 40 in this case we can create a new alert

Which will do just that.

This is a message for you to stop. If it is not enough, we can take it further.

Adding a condition to your entry hotkeys

I wrote about conditional entries

DAS Trader advanced hotkeys part 6

DAS Trader advanced hotkeys part 6

Peter Benci
·
June 11, 2024
Read full story

and also

DAS Trader Advanced hotkeys part 13

DAS Trader Advanced hotkeys part 13

Peter Benci
·
August 16, 2024
Read full story

so we can just add a condition to our hotkey that would read the $tradecount variable and not allow the code execution if the value is over the threshold value.

Keep reading with a 7-day free trial

Subscribe to Peter’s Substack to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Peter Benci
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More