Indicator to Strategy HELP! (Page 2) - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Indicator to Strategy HELP!
Started:October 23rd, 2015 (10:15 PM) by kidvic Views / Replies:368 / 10
Last Reply:October 26th, 2015 (12:07 AM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Indicator to Strategy HELP!

Old October 26th, 2015, 12:07 AM   #11 (permalink)
Elite Member
Futures Experience: Advanced
Platform: NinjaTrader8 MtM
Favorite Futures: ES, NQ, YM, CL
trendwaves's Avatar
Posts: 663 since Dec 2012
Thanks: 2,381 given, 2,035 received

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...

        #region Properties

        public bool C
            get { return Values[0]; }

        public double TV
            get { return Values[1]; }

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

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
Reply With Quote
The following user says Thank You to trendwaves for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Indicator to Strategy HELP!

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indicator to a strategy cihde NinjaTrader Programming 5 October 10th, 2012 11:43 AM
How to call this indicator within the indicator/strategy zikonc NinjaTrader 2 July 26th, 2012 03:45 PM
Can I do everything I want in a Strategy? Why use an indicator? DaFish NinjaTrader Programming 10 March 6th, 2012 08:48 AM
Strategy into indicator??? giorgosz The Elite Circle 10 September 21st, 2010 10:47 PM
Ninja Strategy multi-timeframe issue/Strategy to indicator nw123 NinjaTrader Programming 2 December 20th, 2009 06:24 PM

All times are GMT -4. The time now is 09:43 AM.

Copyright © 2016 by 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

Page generated 2016-10-26 in 0.06 seconds with 19 queries on phoenix via your IP