EA only for trail?

8 replies

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #202838

Is it possible to write an EA, which is only pulled to an open position and only trail the SL? Example: I open a long position and add an EA to the chart, which just trailing?

best regards

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #202845

Hello,

you should be able to do this using magic number = 0. See the screenshot

Attachments:
You must be logged in to view attached files.

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #202862

thank u it works !

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #202971

Hello, maybe simple but….
how can i use candles for trailing SL? i like to trail SL in long only on Low last candle and not Low every follow candle + spread.

example:

pos is long
1. SL low from last bar[1] + current spread
2.  if current bar  close = higher as  open ( like green candle) + and the Low from this candle higher as last candle, then set SL to this candle low.

means: in long, set Trail  SL only at Low from last candle + Spread

Puhhh… difficult

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #202994

Hello,

so you want to move SL to Low[1] + Spread only if higher than the previous bar Low[2] (for Long)?

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #202995

ok i found it… You compare the opening with the closing price of the corresponding candles, actually quite simply. But how can I add the spread as distance to the stoploss on the low or high?

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #202996

hello tomas , exact..

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #203038

Hello,

you need to use subtraction (Low[1] – Spread). See the image

Attachments:
You must be logged in to view attached files.

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #203656

it works, thank you 🙂

0

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