NexusFi: Find Your Edge


Home Menu

 





Return a signal from an indicator for use in Strategy


Discussion in NinjaTrader

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




 
Search this Thread

Return a signal from an indicator for use in Strategy

  #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?
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
About a successful futures trader who didnt know anythin …
Psychology and Money Management
 
  #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,976 since Jun 2009
Thanks Given: 533
Thanks Received: 3,709

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

Follow me on Twitter 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:


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,976 since Jun 2009
Thanks Given: 533
Thanks Received: 3,709

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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts