I am trying to find a MACD indicator that shades the region of the chart that is bullish when fast-slow cross. it will be based on parameters set by user. it will shade chart green wh cross up and above zero and op for below. also, it will turn off when true/false. I did not find anything on the ecosystem. can anyone help? here is an example and I have attached indicator I use thanks in advance
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
MACD Trend Region
Collapse
X
-
MACD Trend Region
Hello Group,
I am trying to find a MACD indicator that shades the region of the chart that is bullish when fast-slow cross. it will be based on parameters set by user. it will shade chart green wh cross up and above zero and op for below. also, it will turn off when true/false. I did not find anything on the ecosystem. can anyone help? here is an example and I have attached indicator I use thanks in advance1 PhotoTags: None
-
Hello wealthcig,
Thanks for your post.
Are you looking for an existing indicator that accomplishes your goal?
Or, are you wanting to program this indicator?
I look forward to assisting further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
-
Hello wealthcig,
Thanks for your note.
You could use Draw.Region() to draw a region on the chart when a certain condition occurs. Note that NinjaScript indicators are created or modified in a NinjaScript Editor window (New > NinjaScript Editor). To create a new indicator, right-click on the Indicators folder in the NinjaScript Editor window and click 'New Indicator'.
A way to see that code that accomplishes this is to use the Strategy Builder to set up your conditions and drawing actions, then click the 'View code' button to see the code. Then you could copy the code from the strategy into your custom indicator.
Please see this help guide page about how to create crossover conditions in the Strategy Builder:https://ninjatrader.com/support/help...sOverCondition
And, this help guide page about how to draw on a chart: https://ninjatrader.com/support/help...ToDrawOnAChart
Here is a link to our publicly available training videos, 'Strategy Builder 301' and 'NinjaScript Editor 401', for you to view at your own convenience.
Strategy Builder 301 — https://www.youtube.com/watch?v=_KQF2Sv27oE&t=13s
NinjaScript Editor 401 - https://youtu.be/H7aDpWoWUQs?list=PL...f&index=14
I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript:
https://ninjatrader.com/support/help..._resources.htm
If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our help guide first:
https://ninjatrader.com/support/help...g_concepts.htm
And the MSDN (Microsft Developers Network) C# Language Reference.
https://ninjatrader.com/support/help...erence_wip.htm
Let us know if we may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
Hello wealthcig,
I believe using BarBush / BackBrush would be simplest way to do this. I am not sure how Draw.Region() would work as it needs 2 double series or 1 double series & 1 double variable & you need to highlight the price panel where you don't have any plot. Draw.RegionHighlightX() should work fine but you have to define start & end, calculating these bars based on cross could be tricky. Here you get the script for BarBrush & BackBrush, you can select from settings what you need or skip if not required. Hope it helps!Attached Files
Comment
-
Hi folks,
I have been trying to backtest two year's worth of trades for an idea I have and it's taking forever. I thought it would be easier to put it in a script and run it and optimize, but willing to start as an indicator. Is there anyone willing to donate some time for this? It uses the opening range, MACDTrend Region(s.kinra), and GRaB MA(34EMA high/low). I wrote conditions if it helps.
I guess for now I will work with once everything agrees it will plot an Arrow and the stop loss and take profit using the custom risk-reward tool in ninja. Is this an easy ask? or tough nut to crack? Any ideas?
Name: GreenDay Trades
Sell Conditions: (if)
Opening Range- 120 ticks or less (9:30-9:45 am EST)
VIX S&P 500- equal to or greater than 18 (CBOE data not sure how to input in code.)
Candle closes below 15min range low on the 10-minute timeframe
Price- is below the 34EMA (low)
MACD Trend Region-Histogram is below 0 (48,36,104)
It is not 12 noon (trades must be initiated before 12 noon EST) or no trade.
Then:
Place sell stop 1 tick below the close candle
Stoploss
will be at the opposite side of the range
Exit
Profit target-1.5x of the opening range is reached
Close all positions at 3:55 pm
If the candle closes above 34 EMA (high)
Opposite for long Trades
Thanks for everyone's help in advance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
602 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
559 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment