Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 8/14/2007 Posts: 34
|
Would someone please kindly show me how to set the following up in Blocks Mega Minute?
I want to buy at the open of next bar if...
the close at 10:00am is greater than the close at 9:45am.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
We are trying some ideas out. I will let you know what we come up with.
- Craig Here to Help!
|
|
Registered User Joined: 10/7/2004 Posts: 886
|
Hi Jared. I ran this scan on all US Stocks over the last 3 months, and the scan returned no stocks.
I have MegaMinute, and loaded the scan strategy as posted with no changes.
IS there some setting I might be overlooking? I haven't checked in detail, but I would certainly think at least one stock would have satisfied the intent of the strategy.
Thanks, Bob
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
No.
Jared's attempt has a few logic errors in it that are not easily apparent. We are still working on a solution.
- Craig Here to Help!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 74
|
Hello All,
There was a problem with the last scan that I posted. It was a mistake on my part, and I apologize. I will correct it and post a new scan.
|
|
Administration
Joined: 9/18/2004 Posts: 3,522
|
We had to write a new code block for this to work but it has now been included in the worden code block library (it will automatically be updated when you run the software).
I've attached a strategy with the conditions you requested. Change the sell signal to your liking.
Download the attached file to My Documents\Blocks Files\Tool Parts\Strategies
Attachments: Buy Next Day after 10 above 9-45.bscan - 12 KB, downloaded 657 time(s).
Ken Gilb (Kuf) Chief Software Engineer - Worden Brothers Inc. Try/Catch - My RealCode Blog
|
|
Registered User Joined: 8/14/2007 Posts: 34
|
Hi Ken,
Thank you so much for creating a new code block just for this. You guys are so responsive; I am impressed.
Just one question... I ran the strategy on S&P 500 components watchlist for all history and got no trades. It seems strange that this condition did not produce any signals. Would you mind taking another look at your code again and tell me why that's so?
I appreciate it.
J
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
Make sure the Strategy Time Frame is set to 1 minute and see if that works.
I tweaked the second condition to 10:01am.
The scan produced 1233 trades in the last 3 months on the Nasdaq 100 components.
Attachments: Buy Next Day after 10 above 9-45.bscan - 11 KB, downloaded 625 time(s).
|
|
Registered User Joined: 10/7/2004 Posts: 886
|
Isn't the logic of the strategy incorrect, according to what blocksworks wanted to do?
I think blocksworks wanted to buy at the open of the 10:01 bar if the close of the 10:00 bar was above the close of the 9:45 bar.
The strategy conditions first check if the 10:00 price was above the 9:45 price, AND THEN time of day is 9:31 (I believe).
That means the trade would execute on the following day, not the next minute bar (10:31). no?
I don't think the "and then" condition is necessary, is it?
Thanks Bob
|
|
Administration
Joined: 9/18/2004 Posts: 3,522
|
Ah my mistake, I thought he wanted to buy on the open of the next day.
All you need to do is remove second condition and change the strategy settings to buy on the open of the next bar.
Here's the updated scan. Make sure you change the timeframe to 1 minute.Attachments: Buy Next Bar after 10 above 9-45.bscan - 9 KB, downloaded 637 time(s).
Ken Gilb (Kuf) Chief Software Engineer - Worden Brothers Inc. Try/Catch - My RealCode Blog
|
|
Registered User Joined: 10/7/2004 Posts: 886
|
Is there a way to display; 1) the current time in a legend display (which updates), and 2) the intraday time of the date pointer?
Thanks, Bob
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
Right click on the date pointer and select Properties. Set the Text Format to M/d/yy hh:mm.
|
|
Registered User Joined: 10/7/2004 Posts: 886
|
ahh... thanks StockGuy. It might be nice to use a drop down list with formats for that in the properties window.
What about displaying current time? The "Date.Now" block says it includes the time, but I don't see how to parse the time data.
Thanks, Bob
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
I added a data display to the toolbar and used the following blocks to display date/time.
Date.Now-> Date Text Format -> Data to Display
A parameter block comes along with the Date Text Format block. Set it's Value to MM/dd/yy hh:mm:ss
|
|
Registered User Joined: 10/7/2004 Posts: 886
|
Got it! Thank you.
Bob
|
|
Guest-1 |