NexusFi: Find Your Edge


Home Menu

 





Please help to modify this Indi


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 hen78 
Germany
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Stocks
Posts: 3 since Oct 2013
Thanks Given: 0
Thanks Received: 0

Hello,

I am trying to integrate the Ray Trendfilter indicator to my strategy.
The indi needs some modification to plot a 1 for uptrend and 2 for downtrend.
It always plots a 1 and im totally lost to change this..

May someone could be so kind and help?

Thanks

Hen


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

Can you help answer these questions
from other members on NexusFi?
Asia Equities Crash Overnight -- Nikkei -5.2%, KOSPI -6. …
Traders Hideout
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
Hungary Called for Magyar at 97pct, Ending 16-Year Orban …
Prediction Markets & Event Contracts
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
23 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
the coin hunter
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,093



hen78 View Post
Hello,

I am trying to integrate the Ray Trendfilter indicator to my strategy.
The indi needs some modification to plot a 1 for uptrend and 2 for downtrend.
It always plots a 1 and im totally lost to change this..

May someone could be so kind and help?

Thanks

Hen

my guess is you need to add proper brackets,

modify this part of code and set calculate on close to false
 
Code
		if (this._dsTrendFilter[0] > this._dsTrendFilter[1]) 
			{PlotColors[0][0] = this.UpTrendColor;
			BackColorAll = Color.LightBlue;}
			else if (this._dsTrendFilter[0] < this._dsTrendFilter[1])
			{ PlotColors[0][0] = this.DownTrendColor;
			BackColorAll = Color.LightPink;}
			else if (this._dsTrendFilter[0] == this._dsTrendFilter[1]) PlotColors[0][0] = PlotColors[0][0]; //retain color of last bar, if equal
		}


Reply With Quote




Last Updated on October 23, 2013


© 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