NexusFi: Find Your Edge


Home Menu

 





PlotColors as strategy trigger


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one cory with 2 posts (2 thanks)
    2. looks_two microsat with 2 posts (0 thanks)
    3. looks_3 DavidHP with 1 posts (1 thanks)
    4. looks_4 Jaba with 1 posts (0 thanks)
    1. trending_up 2,169 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 2 attachments




 
Search this Thread
  #1 (permalink)
microsat
houston texas/us
 
Posts: 25 since Dec 2014
Thanks Given: 6
Thanks Received: 2

Can we use PlotColors as strategy trigger?

like
if (CustomIndicator.PlotColors[0][0]==Color.Red)
EnterShort();


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Thursday May 28: GDP + Core PCE + Jobless Claims All at …
Traders Hideout
Prediction Markets Lock Fed Pause at 99pct for April 29 …
Prediction Markets & Event Contracts
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
Al Arabiya: US-Iran Draft Deal Within Hours Contains Hor …
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
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
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



microsat View Post
Can we use PlotColors as strategy trigger?

like
if (CustomIndicator.PlotColors[0][0]==Color.Red)
EnterShort();

maybe it's better to understand which condition to make it red.


Reply With Quote
Thanked by:
  #4 (permalink)
microsat
houston texas/us
 
Posts: 25 since Dec 2014
Thanks Given: 6
Thanks Received: 2

in the indicator,
if (Rising(SMA(14)) && RSI(14) > 30 )
PlotColors[0][0] = RisingColor; //Color.Blue
else if (Falling(SMA(14)) && RSI(14) < 70 )
PlotColors[0][0] = FallingColor; //Color.Red
else
PlotColors[0][0] = NeutralColor; //Color.Yellow


Can we just use PlotColors[0][0] to trigger the short/long entry in a strategy?

When I tried to call PlotColors[0][0], it always gave back 'Color [Empty]'.
But in chart mode of the backtest, the indicator does show three different colors.


cory View Post
maybe it's better to understand which condition to make it red.


Reply With Quote
  #5 (permalink)
 Jaba 
Austin TX
 
Experience: Intermediate
Platform: SaintGobain Crystal Ball
Trading: NQ
Posts: 81 since Oct 2010
Thanks Given: 103
Thanks Received: 134


cory View Post
maybe it's better to understand which condition to make it red.

Well, bulls charge when they see red, right? Then what bears do? They don't like green... I'm confused


Reply With Quote
  #6 (permalink)
 
Riverend's Avatar
 Riverend 
Westlake, Oh
 
Experience: Beginner
Platform: NinjaTrader
Trading: CL
Posts: 356 since Jun 2009
Thanks Given: 1,519
Thanks Received: 220

@cory
I tried using this indicator with the strategy wizard but the two colors green or red are not available when I select
"plot" in the Wizard Gui. When I edited the indicator I see plots for red and green also Rising and falling is referenced.Can the
colors or directions be added to the Strategy Wizard. BTW some funny comments by @Zondor the script. Any help would be appreciated.



LowPassFilter_v1(1).zip


Reply With Quote
  #7 (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


Riverend View Post
...
I tried using this indicator with the strategy...

I don't know how to use strategy, sorry!


Reply With Quote
Thanked by:
  #8 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: NQ / ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,802 since Aug 2009
Thanks Given: 11,742
Thanks Received: 3,018


microsat View Post
in the indicator,
if (Rising(SMA(14)) && RSI(14) > 30 )
PlotColors[0][0] = RisingColor; //Color.Blue
else if (Falling(SMA(14)) && RSI(14) < 70 )
PlotColors[0][0] = FallingColor; //Color.Red
else
PlotColors[0][0] = NeutralColor; //Color.Yellow


Can we just use PlotColors[0][0] to trigger the short/long entry in a strategy?

When I tried to call PlotColors[0][0], it always gave back 'Color [Empty]'.
But in chart mode of the backtest, the indicator does show three different colors.

@microsat I've done this in one of my indicators or strategy but I'm not on my main PC to copy and paste it.
I will look it up this weekend if you are still interested.
Let me know if I should search for it.


Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on X Reply With Quote
Thanked by:




Last Updated on September 18, 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