28 Comments
User's avatar
Four Trades's avatar

Would it be possible to draw a line 10% from the open?

Expand full comment
Peter Benci's avatar

sure, send me a PM

Expand full comment
silea's avatar

Hi Peter,

If I understand well the definition of the ATR ("The true range indicator is taken as the greatest of the following: current high less the current low; the absolute value of the current high less the previous close; and the absolute value of the current low less the previous close"), it's a comparison between 3 values and the highest is used.

Your script just takes in account one of these 3 values, which makes it unprecise for stocks that are gaping.

Do you think it could be possible to go closer to the real definition of the ATR ?

Thank you

Expand full comment
Peter Benci's avatar

Hi Silean, I am not following your definition, but whatever you want to calculate you can calculate and use.

Expand full comment
Ben's avatar

For that we would need in the script to get de previous day close value, is it possible ?

Expand full comment
Peter Benci's avatar

yes we can get any candle value

Expand full comment
Ben's avatar

Hello Peter,

How do you to to delete these ATR lines if you want to re-draw them ? Right click + remove is quite annoying.

Is it possible to have a hotkey that deletes just these ATR lines (without touching other lines that I might have drawn) ? Thank you

Expand full comment
Peter Benci's avatar

so far only the trend lines can have names so those can be deleted by names.

otherwise i do

FocusWindow MY1MIN;

RemoveALLLines;

Expand full comment
Ben's avatar

Is it possible now with 5.8.0.2 ?

If yes could you explain quickly how to do ? Thanks a lot

Expand full comment
Peter Benci's avatar

i have not tried yet but i do not like this version and not going to use it as it breaks important stuff for me

Expand full comment
Nayef's avatar

Hi Peter,

It would be a great idea if you can create a post on how to actually use this in a real trade. I managed to get the hotkey to work.

Does it matter when you click to draw the line during the trading day? as it takes the HOD and LOD values.

Expand full comment
Peter Benci's avatar

it shows you where you can expect the end of the move to the other side. obviously if the stock is breaking the highs of the day the bottom line gets

redrawn higher and higher. I use it for finding areas for reversal

Expand full comment
Nayef's avatar

so the best time to draw the lines as in the first 5 minutes I assume ?

Expand full comment
Peter Benci's avatar

i do it on demand as it makes little sense to draw them on every symbol i have a look at.

Expand full comment
Ben's avatar

Nice idea but I can't make it work.... When I go to "variable", $HITGT and $LOTGT are equal to 0. It looks like the calculation doesn't work 😕

Expand full comment
Peter Benci's avatar

i use it every day so i know it works :)

Expand full comment
Ben's avatar

There is probably something I do wrong. Do you see values in "variable" for $HITGT and $LOTGT after you hit the hotkey ?

Expand full comment
Peter Benci's avatar

sure. any variable you use has to be visible there. if it has 0 then go to the source. also make sure you have latest dastrader version to be able to read the indicator values

Expand full comment
Ben's avatar

Yes it reads the indicator value correctly.

In variable for "$HOD", I see type "string" and value "HI" (instead of the value). Is that normal ?

Expand full comment
Peter Benci's avatar

oh yes that is the problem. I am using the script as hot button and if you are trying to do it as a hotkey the HI and LO are properties of the montage window so you need to read them differently using either

Focuswindow MONTAGE1;

at the start of the script. You need to name your montage window as MONTAGE1

or you can call it as

$HOD=GetWindowObj("MONTAGE1").HI;

$LOD=GetWindowObj("MONTAGE1").Lo;

I will update the article accordingly. Thanks for reminding me of this.

Expand full comment
Rocco's avatar

So do be clear, if we just want to use a hotkey [not a montage button], then the below? Thanks in advance Peter

$HOD=GetWindowObj("MONTAGE1").HI;

$LOD=GetWindowObj("MONTAGE1").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 +"%" );

Expand full comment
Ben's avatar

Brilliant, it works now. Thank you !

Expand full comment
Jason's avatar

Great stuff here Pete, thanks for sharing! I would love to have a hotkey for a pop up text box to show how much I am risking vs my stop (or some other number that das can reference). Ex. take my shares, average and stop order, hit a hotkey and it show my $ or R risk. Thanks.

Expand full comment
Peter Benci's avatar

that is easy to accomplish in several ways. one way is to display it in the variables window which can now be part of your desktop so you can see it all the time. it can be static - once you open the position or dynamic - updated constabtly to the current price. (this is basically unrealized profit visible on your account size) the other way is to display it on a keypress as you mentioned which is more universal. PM me for the details if you like and I will cover it in the next post.

Expand full comment