Close my longs when either crossover MA or ADR14 daily value hit
4 replies
IvanD1983
6 years ago #117031
Hi,
I’d like to exit my longs only if in profits and under the following conditions:
Either a crossover of the moving average occurs (already got that one right) or price hits the ATR14 for the day (I am struggling on how to give this order).
Could you please provide assistance?
Find my screenshot.
Thanks in advance.
tomas262
6 years ago #143353
Hello,
you can use BarRange as you showed in your previous topic. If BarRange[1] >= ATR(14) – Exit position
IvanD1983
6 years ago #143367
Tomas,
BarRange[1] only looks at size of bar from high to low.
What I need is the following:
When I am long, I will exit either when I get Xover of MAs against my position (this part is easy)
OR
If the Daily ATR14 (expected range for the day) is hit.
See image for a graphical illustration.
tomas262
6 years ago #143449
Hello,
you could setup the condition for exit as shown in the example attached.
BarRange can be used for that too.
IvanD1983
6 years ago #143454
Great. I made the changes.
I understand that since the bar range is still the current day’s one, that’s why Shift is 0…
Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)