NexusFi: Find Your Edge


Home Menu

 





PlotColors as strategy trigger


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one microsat with 2 posts (0 thanks)
    2. looks_two cory with 2 posts (2 thanks)
    3. looks_3 Riverend with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 2,334 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?
Fed Hike Odds at 57% After Warsh: England Surges 12.9%, …
Prediction Markets & Event Contracts
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Thanks Mike. Godspeed.
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098



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
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098


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,825 since Aug 2009
Thanks Given: 11,784
Thanks Received: 3,051


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