- ago
How do I do to:
Buy at least of the last 2 candles
Sell ​​at the maximum of the last two candles
or sell after 7 candles
I want limited orde
0
601
Solved
21 Replies

Reply

Bookmark

Sort
- ago
#1
Think Highest and Lowest and use the "Indicator new High/Low" condition in Building Blocks.
0
- ago
#2
I already tried using this new high/low. But it's not making me buy the low of 2 previous bars, and sell the high of 2 bars
0
Cone8
 ( 25.51% )
- ago
#3
Does your Strategy look exactly like this?

1
Best Answer
- ago
#4
I achieved.
But now how do I Allow operations to start from 10:15 and end at 16:15?
I already downloaded the powerpack
0
- ago
#5
Use the "Time of day" condition.
0
- ago
#6
That's what I put here, but it's not working, I'm doing something wrong
0
- ago
#7
Yes, like expecting it to work on Daily data. That's not going to work.
0
- ago
#8
It is intraday chart 15minutes
0
Glitch8
 ( 11.39% )
- ago
#9
Can you post a screen shot of what you have?
0
- ago
#10


I put it like this, it was very wrong

I want operations to start from 10:15 and end at 16:15
0
Cone8
 ( 25.51% )
- ago
#11
First, don't use "Equal to" a time, unless you want the operation to occur ONLY at that time.

If you want "between times", add two Time Of Day qualifiers to both Buy and Sell blocks, like this -

2
- ago
#12
I noticed that there were operations that lasted until the next day, how do I close the operations until the end of the day?
Because the stop at the time of 7 bars drags the trade until the next day, how do I close the trade, before the market closes
0
- ago
#13
0
- ago
#14
You can adjust the "Time of day is less..." accordingly (reduce the time), isn't it?
0
Cone8
 ( 25.51% )
- ago
#15
The chart has 15-minute bars and the last bar ends at 16:00. (Note: Weatlh-Lab timestamps are at the end-of -bar.) The sell at market is triggered on the 7th bar, but the 7th bar was at 16:00, and the trade takes place on the next bar.

If the idea is to always exit before the end of the day, add another Sell At Market and drop a "Bar of Day" condition on it, like this -



Since it's a Market order, this will sell at the open of the last bar. If you want it to be a Market On Close (MOC) order, you'll have to edit the OrderType of the signal in the C# code version from OrderType.Market to OrderType.MarketClose.

Also, make sure your buy condition is limited to trigger on or before 1530, otherwise there will be no way to exit before the end of the day.
1
- ago
#16
I'm checking if everything is ok with the strategy, I come across this.
The objective is to buy at the minimum of two candles and sell at the maximum of two candles.
The stop is in time 7 bars
Here you can see that it hit the target of 2 previous bars, but it didn't, and it gave a surreal gain, and it only closed after 7 bars.
coincidentally, this happened at 15:15, the last time I allow to open a trade
0
- ago
#18
The Buy order executed at 15:15 (because the bar of entry was 15:00) but the Sell at Limit block is conditioned to not process bars after 15:15. Hence the strategy has to wait until "Sell after 7 bars" comes to play. It's working exactly as you designed it. 🤷‍♂️
0
- ago
#19
How to fix this?
0
- ago
#20
Have you seen Cone's Post #15 ??
0
- ago
#21
it worked, it was only put on sale until 16:30
0

Reply

Bookmark

Sort