- ago



Hello. I installed Powerpack to create a block strategy limiting buys to before 15:00 (I suppose it is Eastern US Time, not my local time which is an hour later), and selling positions in the evento of a SMA xover or at 15:59.
When back testing it keeps buying and selling after the specified hours. I need help in order to solve it using blocks (see attached images 1 and 2).

Thank you in advance. Diego
#WealthLab8 #Powerpack
0
523
Solved
12 Replies

Reply

Bookmark

Sort
- ago
#1
Of course it will sell after 15:59 because you made it so by choosing "greater than or equal".
0
- ago
#2
Anywise I am still having problems. I changed it to EQUAL and it is still showing me sell operations the following day, I also told it to buy LESS OR EQUAL to 15:00 ant it still buys after this time
0
- ago
#3



I still need help please, I changed More or Equal to Equal in order to sell but it keeps selling even several days after that, also it keeps buying after 15:00 hours. Surely it's something easy to solve but I am stuck on this.
0
Glitch8
 ( 10.62% )
- ago
#4
You have two Sell Blocks. Each one is evaluated independently.
0
- ago
#5
Indeed I have two sell blocks, I assume it acts as two possible conditions, I mean an "or": a) the SMA x-over or b) the time of day condition.

Am I wrong?

Anywise It's still buying beyond the 15:00 time of day. How can I fix it?

Thank you in advance!!
0
- ago
#6
1. Instead of that "Time of Day = 15:59" exit block, use "Bar of day = Next-To-Last" on market hours.

2. For the entry, also add a "Bar of day is not equal to Last (Market hours)" block to prevent evaluating the entry condition on the last bar of day.
1
- ago
#7
Here's how it should look:

1
Best Answer
Glitch8
 ( 10.62% )
- ago
#8
Eugene, Bar of Day Next-to-Last options I don't believe are working until we get the next build out.
1
- ago
#9
I will try and simulate this tomorrow. I am pretty sure we'll solve it, using the blocks
0
- ago
#10
@espodumenus, Glitch is right: please wait for release of B5 with a fix first.
1
- ago
#11
This is very important in order to do a reliable backtest and subsequent auto-trading of intra-day strategies.

I am not proficient in programming therefore I need to make it work in the Block Editor. So far I can not make Time of Day and / or Bar of Day work. It keeps many of the positions for several days.

Was it solved? Can it be a priority please?

Thank you un advance!
0
Cone8
 ( 4.98% )
- ago
#12
There's no problem with the code for either of those. But just know that if you're looking for a bar that has a timestamp of 15:58 and you're using 5 minute data, this will [almost never] never match!

Anyway, I got your email, so we'll take care of it there.
1

Reply

Bookmark

Sort