Chuck
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Question On Paint Bar Indicator
Collapse
X
-
Question On Paint Bar Indicator
Hello. I have put together a paint bar strategy which paints the price bars one of four colors depending on whether the MACD is above/below zero and whether the price bar closes in the upper/lower half of it's range. I did this using the strategy wizard. I now want to convert that into an indicator so I can free up chart trader, which I prefer to the dom. I have very limited programming experience. Is there an easy way to convert this "strategy" into an indicator? If not, can you point me to some tutorials that can help me get this accomplished? I am a big fan of paint bar studies but I don't want to continue to shell out $150 to a developer every time I have an idea. Thanks for your consideration.
ChuckTags: None
-
Hi Chuck,
It should generally work the same, as long as there are no order methods. You will want to copy and paste the custom code from your strategy into an indicator.
Look at the following regions / methods and place the custom items in the same place in the indicator.
Variables
Initialize
OnBarUpdate
Properties
If the indicator references prior bar value, then you'll need to be sure to look into this is a potential issue you might see in an indicator but not a strategy.
Ryan M.NinjaTrader Customer Service
-
Hello Ryan. I just want to be clear. Are you saying to only copy and paste the code from the four regions/methods listed above an ignore all the other code in the strategy? For example, the declarations region and wizard settings region? ThanksOriginally posted by NinjaTrader_RyanM View PostHi Chuck,
It should generally work the same, as long as there are no order methods. You will want to copy and paste the custom code from your strategy into an indicator.
Look at the following regions / methods and place the custom items in the same place in the indicator.
Variables
Initialize
OnBarUpdate
Properties
If the indicator references prior bar value, then you'll need to be sure to look into this is a potential issue you might see in an indicator but not a strategy.
http://www.ninjatrader-support.com/v...ead.php?t=3170
Chuck
Comment
-
Thanks a bunch Ryan. That was much easier than I thought. I'm beginning to understand now how the code is structured by the wizard and how to manipulate it to get what I want.Originally posted by NinjaTrader_RyanM View PostHI Chuck,
Attached is a screenshot of the SampleMACrossover strategy code. The custom code for the four sections you need are highlighted with a red rectangle.
Best Regards
Chuck
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
331 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
549 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment