Henk8
- ago
Is it possible to add bollingerbands (upper, lower) in the first en second settings. At the moment the choices are very limited.

I want to add the two indicators (see chart) in a strategy.

0
454
9 Replies

Reply

Bookmark

Sort
Cone8
 ( 4.34% )
- ago
#1
That's an interesting, never-before? attempted way to go about detecting an indicator crossover. So don't do it that way.

Instead, in the Indicator Crosses Indicator block, use Close Crosses Under BBLower(...)
0
Henk8
- ago
#2
I want to combine both. First the close needs to be under the BB Lower, then next step close above BBupper. A kind of reversal.

0
Henk8
- ago
#3


Text book example ;-)
0
Cone8
 ( 4.34% )
- ago
#4
Ok, so you want to detect the first Close crossover BBUpper after a Close crossunder BBLower. I wouldn't have done it the way you did - that's pretty clever using CrossUnder/OverBar for that.

I can't think of a way to get there with Building Blocks. Normally, you'd be able to use IndOnInd for something like that, but since CrossOver/UnderBar takes 2 series, it won't work. :(
0
- ago
#5
Well, you could do this in C# code a number of ways. In the Initialize block, first create a simple List<int> of all the bars with Close crossunder BBLower points. Then within the Execute block, when you hit a Close crossover BBUpper point, check the crossunder List<int> for a nearby case in the recent past. (You might want to use some kind of "ordered list" so you can search it faster.)

But, in looking at your graphic, let me suggest another strategy, which might work as well. Notice how your graphic has consecutive Closes just above the midline prior to the Close crossover BBUpper point. It's easy to test for this condition in code within the Initialize block.
CODE:
consecutiveClosesAboveMidline = TimeSeries.BarsSince(bars.Close > midlineMA);
Now in Execute, you test for your Close crossover BBUpper point and && that condition with (consecutiveClosesAboveMidline[idx] > 5). If both are true, you Place the Buy.

My point is, if you're going to do "tricky strategies", I would do them in code because it's significantly easier. If you don't want to learn C#, then find a partner that does. While you're doing that, you might also want a partner that's has multivariant statistical background so you can round out your team. Happy computing to you.
0
Henk8
- ago
#6
Thank you for the info. I will try to figure this out because it's only a part of the strategy.
0
Henk8
- ago
#7
Quote Superticker:
QUOTE:
My point is, if you're going to do "tricky strategies", I would do them in code because it's significantly easier. If you don't want to learn C#, then find a partner that does. While you're doing that, you might also want a partner that's has multivariant statistical background so you can round out your team. Happy computing to you.


Are you interested to be a partner?
0
- ago
#8
QUOTE:
Are you interested to be a partner?

Ha, ha. I'm barely getting all my engineering work done let alone WL work. :-)

I was suggesting a partner that's local to you so you could sit down together and he might be able to teach you some C# coding. If you've used an OOPs (object-oriented programming) language before, picking up C# is easy. If not, then having a partner or instructor (i.e. take a class) would be helpful.

There were logistic problems with early computer languages like FORTRAN IV. One module would corrupt a data object (perhaps on disk) that would trickle down into four or five other modules. You were left wondering which module was the culprit? Weeks of time were wasted looking for the bug. Modern OOPs languages employ encapsulation, information hiding, properties, and variable scoping to restrict the bug to an isolated area (OOPs "class" object); but said methods are not intuitive and confuse students. Have you ever wondered why a C# method only returns one output object (typically and ideally) and no more?

If you're new to OOPs languages, take a class and find a student in the class that might be interested in investing. That's your foot in the door. Even if the class covers Java or C++, the logistics used will be the same as in C#, so it's an easy transition. Only the syntactic expressions are different between OOPs languages; their code architecture is all the same.
0
Henk8
- ago
#9
Ok. Thanks for the feedback.

FYI: I have absolutely no experience with programming,
0

Reply

Bookmark

Sort