Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I'm trying to write a strategy that enters long when DoubleMA (5 HMA, 45 VMA) is rising (blue) and SuperTrend (3, VMA, 1.23, 3, ATR) is rising as well. Will short the opposite as well. NT, however, is not cooperating and I get the following error messages:
'NinjaTrader.Strategy.Strategy.TSSuperTrend(int, TSSuperTrend.Utility.MovingAverageType. double, int, TSSuperTrend.Utility.SuperTrendMode)' is a 'method' which is not valid in the given context
AND
'NinjaTrader.Indicator.Mav' is a 'type', which is not vaild in the given context
When I tried to doing this through the wizard, (DoubleMA on the left, == in the middle and "Rising" on the right OR DoubleMA rising == true OR DoubleMA > DoubleMA bars ago 1) I get this error message:
Return type of left expression 'DoubleMA' and right expression 'Boolean' do not match. You need to select a different item.
Why does Ninja hate me?
Thanks - Dave
Can you help answer these questions from other members on NexusFi?
Thanks for responding. Pretend, though, that I am a complete idiot when it comes to NinjaScript (pretend = I really am)
I followed your instuctions as follows:
Name = Rising, Type = int, Default = 1, Min = 1, Description = Rising DoubleMA (added your conditions for falling and neutral as well). After that, I added DoubleMA to the left (5 HMA, 45 VMA, signal), == in the middle and "rising" to the left. Got the same 'Boolean' error message.
I wish I could say that helped but I felt smarter before this post I assume this means I will need to code directly and can't use the wizard for all of this?
By the way, I used to live in Hartford. You're not a fellow UHA grad, are you? If so, well then, I'm sorry...
If anyone here has used TSsupertrend in a strategy, could you please, for the love of everything holy, PM me or post an existing cs file to this thread? I would greatly appreciate it, as would the last remaining hairs in my head.