DAS Trader Advanced hotkeys part 12
Semaphore for entries - one step closer to a trading bot
The idea of the semaphore is to show me a green light when my conditions are met and a red light when they are not met.
The logic is described in the following scheme.
Read the data and populate the variables
Determine if we are to check the rules for long trade or short trade
Run through the conditions and add score for each fulfilled one
Determine if the score is high enough to give us a green light or not.
The more conditions we have, the higher the score requirement. Some conditions can have higher weight.
For example, for my parabolic reversal setup I measure the quality as shown on the following picture
If I miss one of the higher scored rules, the trade is automatically below 80% quality, which is terrible. The less significant rules have only 1 point. That being said, I will be focusing on the most significant rules I often break to help me out with the signalling.
For that reason, I will make separate hotkeys for scoring the current state of the condition, then call out those hotkeys in a chart update script to get constant calculations of the score.
As a red/green light, I can use colored line drawing to the chart. As I am entering near the HOD or LOD on the chart, I will use a global horizontal line at the HOD or LOD in the color of green or red(purple in my case). In the near future there should be colored buttons possible too. Loading a chart config with a colored background I do not recommend as it is the very same window that uses the update script, so it will be hard to keep the both templates the same version of the update script.
The purple line on the video is my red light signal. I do not use red as i am using red for the price indicator line.
To make things simple to manage, I am using the exechotkey() function. Each condition will be a separate hotkey, which I will call in the chart update script.
The other parts of the script will be stored in hotkeys too, allowing me to swap the relevant part of the code for improvements and not touch the parts that work as intended. It will also allow you to copy my code and replace it with your own.
For the conditions and scoring system, I will create several hotkeys. These will be interchangeable, so feel free to add or replace with your own conditions. For all the conditions, I will use VWAP to determine if I am looking for a long entry or a short entry. Being a reversal strategy, I will look for Long when below VWAP and for Short when above VWAP.
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.