Reply

Delete Pending Orders If Initial Order is Closed or…

1 replies

RJL

Customer, bbp_participant, community, 67 replies.

Visit profile

8 years ago #114550

Is there a way to delete pending limit/stop orders if an existing order is closed.

 

i.e.

 

EA buys market (trade 1)

And simultaneously opens additional limit/stop orders that get triggered at certain levels.

 

But if trade 1 gets closed (either by hitting TP or SL) and the additional orders were NOT triggered, is there a way to have these additional orders deleted?

 

Alternatively…

 

When using an indicator like ‘Highest’ or ‘Lowest’, is there a way to ‘fix’ the point at which the ‘highest’ and ‘lowest’ levels are set…?

 

i.e.

 

at 9am, the highest 1H high of the last 10 bars might be 1.2000

 

at 11am, the highest 1H high of the last 10 bars is now only 1.1920 (80 pips lower)

 

But I want the EA to only base the highest 1H high from a point in which another rule was triggered at the 9am print. So at 11am is wouldn’t use the last 10 bars from 11am, it would still reference the highest 10 bars from 9am.

 

Hope that makes sense.

 

 

Please can you let me know.

 

Thanks.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #134561

You can use ‘Close Position’ to cancel the order. Just use correct magic number for that.

 

Regarding highest/lowest you could create a helper variables to store values/prices you later need 

0

Viewing 1 replies (of 1 total)