Reply

How to set take profit 2x the stoploss (from the last swing low)?

5 replies

jpenrose1

Subscriber, bbp_participant, community, customer, 11 replies.

Visit profile

1 year ago #278098

Hi-

I am trying to set the stop loss at the lowest of the last 10 bars – 1 * the ATR to give it a little room.

Then, I want to set the take profit 2x of that stop loss.

I tried writing the stoploss into a variable, then multiplying by that and it’s not working.

Any help would be very much appreciated by everyone, since this is a very common way of trading.

Please see template attached.

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

1 year ago #278149

Hi,

you do it right by the variable but you need to “move” the variable calculation in front of the EnterAtMarket order. You need to calculate the value first then use it 🙂

Let me know if any help needed

0

jpenrose1

Subscriber, bbp_participant, community, customer, 11 replies.

Visit profile

1 year ago #278158

Thanks Tomas-

YES, I definitely need help since I am not a programmer.

I did notice that I probably need to use the “convertpipstoprice” function as well on the stoploss.

Please advise-

0

jpenrose1

Subscriber, bbp_participant, community, customer, 11 replies.

Visit profile

1 year ago #278160

Tomas-

I have moved it above the order and I believe I “corrected” the price levels (making them both prices) and it still won’t place any trades.

Can you please take a look and see what I am missing?

Thanks in advance!!

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

1 year ago #278200

Hi,

you have mixed ConvertPips with price values.

When you use that function you get number of pips which cannot be subtracted or mixed with price values. see the example

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

0

jpenrose1

Subscriber, bbp_participant, community, customer, 11 replies.

Visit profile

1 year ago #278201

Thanks so much Tomas!

I definitely would not have figured that out!

Very much appreciated!!!

0

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