- ago
QUOTE:
... streaming partial bar calculation ... Let us know which indicators you use in Streaming charts and we’ll add those ...

I will! From the screenshot below, you can skip Elder Force because WL doesn't have that one. And that indicator is very similar to Klinger already. Please add streaming bar calculations for Klinger, which is called KVO on WL. Also add the MoneyFlowOscillator by Vitali Apirine. I like that one better than Klinger, but Fidelity Trader+ doesn't have that one.

Finally, let's add IBS (Internal Bar Strength) as well. And thanks for doing it.



I think you would get more responses if you ask users to list the indicators they use in streaming Charts for real-time trading.
0
171
12 Replies

Reply

Bookmark

Sort
Cone8
 ( 17.57% )
- ago
#1
I'll see what I can do, but if too many of requests come in, I might have to retract that offer!
1
- ago
#2
QUOTE:
... too many of requests come in,...

I think there won't be that many requests because only a few indicators make sense for partial-bar streaming Charts. That would include the more modern money-flow indicators.

For example, if the money flow (i.e. Klinger or KVO) is moving into the stock, I'll do a market Buy because the price will be going up shortly. In contrast, if the money flow is study, I'll do a limit Buy bidding low because there will likely be slippage (or a pull back). If the money flow is going down, I won't buy it at all.

Most indicators aren't that revealing because they only track price. But money flow tracks both price and volume action, so it's very revealing on a streaming Chart. But it won't predict the future. The Kalman filter (indicator) or RegEMA may be better for that, but they won't track volume unfortunately. I suppose I could feed the money flow time series into the Kalman to "attempt" to predict the future; sounds like madness. Happy trading.
0
Cone8
 ( 17.57% )
- ago
#3
IBS and MoneyFlowOscillator were pretty straightforward, but KVO requires the streaming value of indicators of intermediate series. I'm not able to get the streaming value for those without completely recreating the indicator for every tick, so that seems to be a limitation for now.
0
- ago
#4
QUOTE:
KVO requires the streaming value of indicators of intermediate series.

I didn't even think about the KVO calculation being dependent on computing the streaming values of intermediate indicators. That's an interesting problem.

Well, let's not worry about KVO right now. I can employ the MoneyFlowOscillator instead, which I like better.

---
Off topic, but if you could post your code for the streaming partial-bar calculation for EMA (or similar "simple") indicator, that would be helpful. I have some of my own indicators I would like to add this partial-bar calculation too. Moreover, I don't want to recalculate for every tick IQFeed generates, so if there's a timed wait event of 15 seconds averaging the ticks, that would be good. Maybe the latter feature could be included into WealthLab.Core.
0
Cone8
 ( 17.57% )
- ago
#5
First, take a look at the SMA sample -
https://www.wealth-lab.com/Support/ExtensionApi/IndicatorLibrary

Of course, EMA is a bit different because it's an IIR indicator - the next value depends on all the previous values. The clue you need is to declare the variables used in Populate() as local class variables. Then, after the indicator is created, you'll have the final values for the _sum and _difference to use in CalculatePartialValue().
0
- ago
#6
QUOTE:
you'll have the final values for the _sum and _difference to use in CalculatePartialValue().

That's not a problem. The problem is how to setup the event thread that's triggered every 10-15 seconds? I don't want to recalculate the partial bar for every IQFeed tick.

I think having a WealthLab.Core method to average the ticks and trigger an event every 10-15 seconds passing that average would be handy. Perhaps the developers are wondering how many users would use such a method?
0
Cone8
 ( 17.57% )
- ago
#7
Re: for every IQFeed tick
That won't happen. CalculatePartialValue() is called only a few times each second - max. If that's too much and you want to complicate it, you could add your own throttle to return the last partial value until 10 seconds has passed since the last time.
1
Glitch8
 ( 11.31% )
- ago
#8
Like Cone said, WL8's chart has buiilt in throttling, so the partial bar indicator calculation only happens a few times a second, it's not tick based. This is good enough for our human observation powers :)
1
- ago
#9
QUOTE:
WL8's chart has built in throttling, so the partial bar indicator calculation only happens a few times a second,

It would be nice if the built-in throttling let one pass in an argument so the indicator developer could throttle it even more. But I really like the throttling feature.
0
- ago
#10
QUOTE:
EMA is a bit different because ... the next value depends on all the previous values.... you need is to declare the variables used in Populate() as local class variables.

That would work for a non-static method. But since EMA is declared "static", then there's isn't a pointer (reference) connected to its instance. I "thought" class variables were garbage collected after exiting unless their pointer is maintained (i.e., the method is non-static). Are you saying the EMA class is now a non-static class and returns a reference? I'm confused; maybe my knowledge of C# isn't so good. (Could a static class somehow maintain a pointer in a MyStrategy instance after it executes so its field variables are maintained? So the EMA static class variables remain alive as long as the MyStrategy instance executes?)

Some of my own indicators are non-static, but that's because they have class field variables that subsequent methods reference. That means the "new" operator returns a reference for their instance.
0
Cone8
 ( 17.57% )
- ago
#11
How did you arrive at the idea that EMA is a static class? Only the Series and Value calls should be static - if you even add them. They're not required, but by convention all WL Indicators will have the static Series method.

Convenient link to the doc:
https://www.wealth-lab.com/Support/ExtensionApi/IndicatorLibrary
1
- ago
#12
QUOTE:
How did you arrive at the idea that EMA is a static class?

Thanks for correcting me. So all indicators are non-static classes. Clearly I haven't written a new indicator in awhile. :-)
1

Reply

Bookmark

Sort