Step by step
Follow this 4-step process:
Install and configure DAS Trader
DAS Trader 5.7.9.0 or newer is installed and Hotkey Advanced Script Enabled in Settings - as described here
add the ATR to a chart
For this, you need to display the ATR on a chart. For my purposes I use the daily chart. You need to add the ATR study to the chart and give it a name
for our purpose we name the study “myatr” as displayed on the above picture.
Make sure to change the Study Name field.
Read the ATR values into a variable
Right-click the chart window and select Configure. Scroll to the very bottom of the window and put the following into the Update Script field.
$MYATR=GetStudyVal("myatr");
Name the chart window of the daily chart
This is needed so that when you press the hotkey, the lines are drawn in the specific chart window so you do not have to take care on which window you are focused on.
In this case the name of the chart windows is MYDAILY
create the hotkey or hot button
Now the calculations happen all in the hotkey where it adds and subtracts the ATR value from the today’s low - LO and today’s high - HI
Draw ATR lines to the daily chart
$HOD=HI;
$LOD=LO;
$HITGT=Round($LOD+$MYATR,2);
$LOTGT=Round($HOD-$MYATR,2);
FocusWindow MYDAILY;
DrawHorzLineWithPrice($HITGT);
DrawHorzLineWithPrice($LOTGT);
$LOD=LO;
$HITGT=Round($LOD+$MYATR,2);
$LOTGT=Round($HOD-$MYATR,2);
FocusWindow MYDAILY;
DrawHorzLineWithPrice($HITGT);
DrawHorzLineWithPrice($LOTGT);
This will draw you automatically the yellow horizontal lines to the ATR calculated from bottom to the top and from top to the bottom.
Other useful considerations
If you want to display the same values as a message with some additional data like how much is it to the ATR and display the RVOL (in case you don’t see it on your montage) you can do that with the following hotkey.
Show message box with the ATR values
$HOD=HI;
$LOD=LO;
$MYRVOL=RVOL;
$HITGT=Round($LOD+$MYATR,2);
$LOTGT=Round($HOD-$MYATR,2);
$TOHATR=$HITGT-LAST;
$TOLATR=LAST-$LOTGT;
MsgBox($HITGT +" to Hi ATR: "+$TOHATR +"\n" +$LOTGT +" to Lo ATR: "+$TOLATR +"\n RVOL:" +$MYRVOL +"%" );
$LOD=LO;
$MYRVOL=RVOL;
$HITGT=Round($LOD+$MYATR,2);
$LOTGT=Round($HOD-$MYATR,2);
$TOHATR=$HITGT-LAST;
$TOLATR=LAST-$LOTGT;
MsgBox($HITGT +" to Hi ATR: "+$TOHATR +"\n" +$LOTGT +" to Lo ATR: "+$TOLATR +"\n RVOL:" +$MYRVOL +"%" );
This will show you following message box
Feel free to add any text you like.
There is a limit of trend lines your DAS Trader can remember (which is a setting) and it has a CPU penalty so the more lines you have the slower your DAS gets theoretically so it is useful to have the following hotkeys ready for the cleanups
Setup delete all trend lines hotkey
RemoveAllTrendlines;
I personally keep it on ALT+SPACE combination.
Setup delete all trend lines for all tickers hotkey
RemoveALLLines AllSymbols;
I personally keep it on CTRL+ALT+SPACE combination.
As you probably understand, we can draw other lines like targets and partial zones calculated based on your opened position too. I will be covering more of these features in the next posts. If you have any specific needs please feel free to consult it with me.