- ago
How to put a stop loss order on the low of the bar prior to your entry bar using building blocks?

I've found a tool that puts a stop loss order at the low of your entry bar, but this is not what I need. I need the stop loss order on the low of the previous bar of my entry bar.

I'm stuck with this problem, any light would be immensely appreciated.

Image attached for reference.

Many thanks.
0
669
Solved
10 Replies

Reply

Bookmark

Sort
- ago
#1
This is not supported by the PowerPack condition block that you found. When you finished with the Blocks, as this change could not be reversed, click "Open as C# Coded Strategy" to create a coded version of your strategy. Change all respective lines as shown below. Save and work with this strategy instead of the Blocks version.

1. Change this:
CODE:
if (bars.Low[index] < foundPosition0.Bars.Low[foundPosition0.EntryBar] )


2. To this:
CODE:
if(foundPosition0.EntryBar > 0) if (bars.Low[index] < foundPosition0.Bars.Low[foundPosition0.EntryBar - 1] )
0
Cone8
 ( 4.98% )
- ago
#2
QUOTE:
How to put a stop loss order on the low of the bar prior to your entry bar using building blocks?

Actually, we do have a rule for this one in the PowerPack -



.. of course you should put a condition on that SellAtMarket or remove it.
0
Best Answer
- ago
#3
It's great that we've got this condition yet its name doesn't reveal its potential.
0
Cone8
 ( 4.98% )
- ago
#4
Suggestions are welcome, but I think that "Cover/Sell at Limit or Stop At Indicator Value n bars before entry" is too long.

How about... ?
"Cover at Limit or Stop at Entry Lookback"
"Sell at Limit or Stop at Entry Lookback"
0
- ago
#5
Sounds good!
0
Cone8
 ( 4.98% )
- ago
#6
Done!
1
Glitch8
 ( 10.62% )
- ago
#7
Yes, the rules' names in no way indicated that they refer to the entry bar at all, good change.
1
- ago
#8
QUOTE:
I've found a tool that puts a stop loss order at the low of your entry bar, but this is not what I need.

Let's add a choice of bar (entry or before entry) to this Condition in next update of the PowerPack:

1
Cone8
 ( 4.98% )
- ago
#9
This a new sell block, right?

Edit: Okay, I see, it's a condition, not an exit block.
0
- ago
#10
You guys are great! Tyvm!
2

Reply

Bookmark

Sort