NexusFi: Find Your Edge


Home Menu

 





Indicator to Strategy HELP!


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one kidvic with 4 posts (0 thanks)
    2. looks_two trendwaves with 3 posts (4 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 MichaelH with 1 posts (0 thanks)
    1. trending_up 4,368 views
    2. thumb_up 4 thanks given
    3. group 4 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread
  #11 (permalink)
 
trendwaves's Avatar
 trendwaves 
Florida
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader 8
Trading: ES, NQ, CL
Posts: 703 since Dec 2012
Thanks Given: 2,898
Thanks Received: 2,525


kidvic View Post
This script exists inside an indicator, if I create a strategy how do I link it?

The values of C and TV would need to be made public in the properties section of the indicator file. Then you would reference those properties from within the strategy...

So in your indicator properties you might have something like this...

 
Code
        #region Properties

        [Browsable(false)]
        [XmlIgnore()]
        public bool C
        {
            get { return Values[0]; }
        }

        [Browsable(false)]
        [XmlIgnore()]
        public double TV
        {
            get { return Values[1]; }
        }
				
       #endregion

Then in your strategy you can access those values like this (where XYZ() is the name of your indicator)....

 
Code
if (XYZ().C[0])
{
     EnterShortLimit(DefaultQuantity, XYZ().TV[0], "ShortEntry");
     SetStopLoss("ShortEntry", CalculationMode.Ticks, StopLossOffsetTicks, false);
     SetProfitTarget("ShortEntry", CalculationMode.Ticks, ProfitTargetTicks);
}


Be Patient and Trade Smart
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Iran Talks Final Stages -- Two VLCCs Exit Hormuz, Record …
Traders Hideout
CFTC Approves First US Bitcoin Perpetual Futures -- Kals …
Traders Hideout
Zytrade: Devin Brady, CEO - Ask Me Anything (AMA)
Brokers
April 2026 Jobs Report: +115k vs +65k Expected
Traders Hideout
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
20 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks




Last Updated on October 26, 2015


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts