|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
Using the same code in multiple indicators |
StochSpring
|
Post subject: Using the same code in multiple indicators |
Post rating: 0
|
Posted: Sat 13 Oct, 2012, 23:16
|
|
User rating: 0
Joined: Sun 07 Oct, 2012, 10:33 Posts: 5
|
API support: I would like to use the same algorithm library in multiple indicators on the JForex platform. Each of these indicators produces lines that are intended to overlay price and and lines that are intended to overlay one or more other indicators, similar to divergences. Copying the code for the algorithm library into so many separate indicator files makes maintenance very difficult. My questions are: 1. Is there a way to include or import a class library into an indicator on the JForex platform? I have not been able to get the @Library annotation to work with indicators, although it works well with strategies. 2. Is it possible to have an indicator draw on both the price chart and on separate indicator windows? 3. Alternatively, is there a way to control whether the output of an indicator is plotted on the price chart or on another algorithm through a single parameter, such as an optional input parameter? I tried this as well, without success.
Thanks.
|
|
|
|
 |
API Support
|
Post subject: Re: Using the same code in multiple indicators |
Post rating: 0
|
Posted: Tue 23 Oct, 2012, 07:45
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
1. You can use the @Library annotation with indicators the same way you use it with strategies (you may need to combine it with @RequiresFullAccess annotation) 2. No, it's not possible. 3. There is no way you can control that through the optional parameters.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|