Adding amaSuperTrendU11 to custom strategy - compile error | Traders Hideout


futures.io - futures trading strategies, market news, trading charts and platforms


Traders Hideout


Discuss day trading practices and futures trading strategies on this forum for all markets. This forum is also for discussing and reviews for brokers, data feeds, and commercial or third party add-ons




 

Adding amaSuperTrendU11 to custom strategy - compile error

  #4 (permalink)

Munchen / Garching
 
Trading Experience: None
Platform: Ninja
Favorite Futures: CL + DAX
 
Posts: 8 since Oct 2014
Thanks: 0 given, 2 received


rleplae View Post
please post a bit of code of what you do
and the error

Hi!

Basically I want to have a reference to the indicator in my strategy.

private amaSuperTrendU11 myIndie;

When I add the line above I can't compile my strategy anymore. (CS0118 - method used like a type.) I recon the compiler thinks the amaSuperTrendU11 is a constructor call instead of the type definition. However as I looked into the source of the indicator I saw the following definition:

public class amaSuperTrendU11 : Indicator{...}

So if the class name is indeed amaSuperTrendU11 then I should be able to use it as a type right?
(While doing this I was following this forum: https://futures.io/elite-automated-ninjatrader-trading/11208-auto-trading-ninjatrader-7-newbies-3.html#post126728)

In the end I want to have a reference (myIndie), that I initialize at startup (myIndie = amaSuperTrendU11(...) and then finally get the Trend variable of the indicator in my strategy. Meanwhile the forum uses anaSuperTrend as I'm on Ninja 8 I decided to use amaSuperTrendU11

Thanks in advance!

Reply With Quote