NexusFi: Find Your Edge


Home Menu

 





Return a signal from an indicator for use in Strategy


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 pnguyen720 
Los Angeles
 
Experience: Beginner
Platform: NinjaTrader
Trading: NQ CL GC
Posts: 52 since Jan 2017
Thanks Given: 11
Thanks Received: 16

Hey guys,

I have a basic question that I'm sure some of you could answer relatively quickly. How do I take an indicator that's available here and add/modify the code to return a True/False condition for use in my Strategy?
For example, I just downloaded the CenTexFishDiv divergence indicator and after seeing it work in real time, I'd like to backtest the signals. How can I return a True/False for whenever a Short or Long Divergence is spotted (i.e. line drawn)? Would the code modification be made wherever the sound files are generated?

Many thanks,
Paul


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
Double Deadlock: Rubio Calls Hormuz Tolls "Unfeasib …
Traders Hideout
US Navy Blockade of Hormuz Starts Today -- Oil Surges 8p …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,971 since Jun 2009
Thanks Given: 534
Thanks Received: 3,711

I can't find the "CenTexFishDiv" indicator, otherwise I might be able to help. Got a download URL?


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 pnguyen720 
Los Angeles
 
Experience: Beginner
Platform: NinjaTrader
Trading: NQ CL GC
Posts: 52 since Jan 2017
Thanks Given: 11
Thanks Received: 16



shodson View Post
I can't find the "CenTexFishDiv" indicator, otherwise I might be able to help. Got a download URL?

Hi shodson,

You can find it here:
https://nexusfi.com/local_links.php?linkid=1977

I've also attached it, if that helps.
Thank you!


Attached Files
Elite Membership required to download: CenTexFishDiv.zip
Started this thread Reply With Quote
  #4 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,971 since Jun 2009
Thanks Given: 534
Thanks Received: 3,711

The way it's coded now, you can't use it in an automated strategy. A developer would have to add a public Series of when long or short signals fire and then an automated strategy can examine that series on the indicator on each bar. Right now it only exposes IndicPlot0-3 series and I only ever see a value in IndicPlot0.


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
 pnguyen720 
Los Angeles
 
Experience: Beginner
Platform: NinjaTrader
Trading: NQ CL GC
Posts: 52 since Jan 2017
Thanks Given: 11
Thanks Received: 16


shodson View Post
The way it's coded now, you can't use it in an automated strategy. A developer would have to add a public Series of when long or short signals fire and then an automated strategy can examine that series on the indicator on each bar. Right now it only exposes IndicPlot0-3 series and I only ever see a value in IndicPlot0.


Ok, thank you for at least looking. Appreciate it.


Started this thread Reply With Quote
  #6 (permalink)
 pnguyen720 
Los Angeles
 
Experience: Beginner
Platform: NinjaTrader
Trading: NQ CL GC
Posts: 52 since Jan 2017
Thanks Given: 11
Thanks Received: 16

Hi again,

NJT support was able to help me a little by pointing to a reference sample showing how to add a Public series. I made the changes to this code and it largely works except sometimes, it returns a Divergence signal when I don't see one drawn on the chart. I only see this when I run it through a sample test script and call the 2 public series that I added. Inside the Indicator code, when I echo out the private series bool values, it looks right.
I was wondering if possibly you could point out what I'm missing?

Thank you again for your help.


Attached Files
Elite Membership required to download: CenTexFishDivWithSignal.zip
Started this thread Reply With Quote




Last Updated on January 14, 2019


© 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