Can someone help me create a simple strategy with blocks?
Candle 1 is some kind of a doji, must have wicks.
Candle 2 must close above candle 1
Candle 3 buys limit at the high of candle 1
Sell at profit
Buying needs to happen on candle 3 or setup is not valid anymore.
Candle 1 is some kind of a doji, must have wicks.
Candle 2 must close above candle 1
Candle 3 buys limit at the high of candle 1
Sell at profit
Buying needs to happen on candle 3 or setup is not valid anymore.
Rename
No need to limit yourself to Blocks. Despite their flexibility, this setup is not that simple to build there since you 1) key off to particular bars (say within the Multi-Condition Group) and 2) reset the setup. It would be simpler to come up with this in C# code.
I asked in blocks because I can't code at all.
But thanks.
But thanks.
I have to disagree with Eugene here, this one is pretty easy to model using Blocks.
I used the Candlestick Extension combined with a Qualifier to check for doji on bar 1 (1 bar before the signal bar)
I used Indicator Compare to Indicator to check the closing price of the singal bar (bar 2) compared to bar 1.
I used the Buy at Limit (are you sure you want Limit and not Stop?) set to the high of bar 1 using the OffsetInd to get the high of bar 1.
I used the Candlestick Extension combined with a Qualifier to check for doji on bar 1 (1 bar before the signal bar)
I used Indicator Compare to Indicator to check the closing price of the singal bar (bar 2) compared to bar 1.
I used the Buy at Limit (are you sure you want Limit and not Stop?) set to the high of bar 1 using the OffsetInd to get the high of bar 1.
Here's one take on it. You need the Candlestick Genetic Evolver extension for the Candle Pattern rule.
If the doji isn't what you want, you can choose antoher, combine them, or invent your candle pattern > Help (F1) > Extensions > Candlesticks > Candle Codes
If the doji isn't what you want, you can choose antoher, combine them, or invent your candle pattern > Help (F1) > Extensions > Candlesticks > Candle Codes
Glitch's use of OffsetInd is a better take on the limit order!
I think my Post #3 is more correct since the poster wants to key off the high of bar 1, not the lowest as you have here.
QUOTE:
I can't code at all.
I would find yourself a "local" partner to C#/C++ code some of the trickier stuff and to help you learn to code. For simple stuff, Blocks works. But for more intricate stuff, which you're interested in, coding is much easier.
Moreover, using code you can build local utility libraries to compute common tasks as Stop prices and such. And you'll have access to the plotting libraries (ScottPlot) and statistical libraries (Math.NET). This is the real power behind Wealth-Lab.
I misread topic starter's notion, thinking that the buy should happen after bar #3 i.e. on bar #4. That's where my imaginary complexities in Post #1 were rooted.
QUOTE:I already agreed, but the result is equivalent - the trigger bar's high will always be higher than the previous bar's high due to the setup. Therefore the limit price will be at the previous bar's high (the Lowest of the two highs).
I think my Post #3 is more correct since the poster wants to key off the high of bar 1, not the lowest as you have here.
That's not true. If you run both strategies you'll see there are different entry prices for some of the trades because the Lowest(High, 2) sometimes gives the incorrect entry price.
It's different because a different rule that you used: "Close is greater than the Close of 1 bar ago".
Imho, that doesn't match the one requested "Candle 2 must close above candle 1". For that I used "Close is greater than the High of 1 bar ago".
Imho, that doesn't match the one requested "Candle 2 must close above candle 1". For that I used "Close is greater than the High of 1 bar ago".
I could see how someone could interpret it that way, fortunately it’s easy to model either way.
Thank you all!!
Your Response
Post
Edit Post
Login is required