Calling Indicator in Wrapper Function? - futures io
futures io



Calling Indicator in Wrapper Function?


Discussion in NinjaTrader

Updated
    1. trending_up 1,864 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Calling Indicator in Wrapper Function?

(login for full post details)
  #1 (permalink)
 serac 
Arizona, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: MB Trading
Trading: Cello
 
serac's Avatar
 
Posts: 116 since Jan 2011
Thanks: 321 given, 138 received

Okay, I know so few programming terms, I do not even know the right question to ask. I'm writing various strategies, and calling indicators with lots of inputs it tedious, and looks messy. Drives me nuts. I like clean code - helps me think.

As I said, I don't know enough terms to search for an answer. I've done this in other languages (Pascal and Ada), (I know! I know! I honestly don't know much about programming). Can I do this in C#/Ninja?
--------------------------------------------------------------
What I have now:

// Inside some strategy
if (CrossAbove(MyIndicatorA(Input, CoefficientA, CoefficientB, AnotherCoefficient, YetAnother).Value,
MyIndicatorB(Input, CoefficientA, CoefficientB, AnotherCoefficient, YetAnother).Value),1)
{
DoStuff ();
}
--------------------------------------------------------------
What I want to do:

protected DataSeries GetIndicatorA ()
{
return (MyIndicatorA(Input, CoefficientA, CoefficientB, AnotherCoefficient, YetAnother).Value);
}

protected DataSeries GetIndicatorB ()
{
return (MyIndicatorB(Input, CoefficientA, CoefficientB, AnotherCoefficient, YetAnother).Value);
}

if (CrossAbove(GetIndicatorA, GetIndicatorB),1)
{
DoStuff ();
}

Make sense?

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Is there inherently more opportunity in smaller markets?
Traders Hideout
TradingView help in improving Anchored Vwap
Platforms and Indicators
MacdBB V402 NT804 + gradient + pullback not working on N …
NinjaTrader
For the experts of Metastock
Platforms and Indicators
Experience with AGN (Introducing Broker)
Brokers
 
 
(login for full post details)
  #3 (permalink)
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 184 received


That looks doable ... have a look at the sample strategies in the downloads


There are better ones in the Elite downloads !


TJ

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Calling Indicator in Wrapper Function?


Last Updated on February 9, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts