Reply

Close my longs when either crossover MA or ADR14 daily value hit

4 replies

IvanD1983

Subscriber, bbp_participant, community, 46 replies.

Visit profile

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. 

File: 1.png1.png

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #143353

Hello,

 

you can use BarRange as you showed in your previous topic. If BarRange[1] >= ATR(14) – Exit position

0

IvanD1983

Subscriber, bbp_participant, community, 46 replies.

Visit profile

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.  

File: 1.png1.png

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

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.

0

IvanD1983

Subscriber, bbp_participant, community, 46 replies.

Visit profile

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.

0

Viewing 4 replies - 1 through 4 (of 4 total)