Indicator for multiple data feeds
FaiqS last edited by
I have read documentation and went over the issues that people had regarding this but still can't find an answer to my question so I am hoping someone can help me out here.
Basically I have strategy that uses multiple data feeds (each feed is for specific equity) and I am creating own indicator.
My understanding is, the output lines of the indicator will be array of lines (Line for each feed or equity). Is my understanding correct?
If so, how do I define lines array inside the indicator? all I am seeing is
lines = ('metric1','metric'2)
If I have multiple feeds then I should have an array of metric1 and metric 2 for each feed, correct?
Size of the array will be the number of the equities I am feeding to my strategy. That number will be known in my strategy and should be passed to indicator at instantiation. ?
Can you somebody help?
Sorry, but I cannot understand your message.
Let me guess. You have several feeds, and want to create an indicator which will be applied for each feed. If this assumption is correct, then you write your indicator and then apply it in the strategy
__init()__to each feed using
forloop and dictionary to store indicator results.
Check out this link,
The Strategysection: Docs - Momentum Strategy.