I'd like to have it notice a red , red, then green bar, where the green bar will be greater then the last red bar.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can someone help me create a simple candle stick patter indicator?
Collapse
X
-
Can someone help me create a simple candle stick patter indicator?
I have it done in think or swim, but I don't know how to make one through ninja trader if someone can help.
I'd like to have it notice a red , red, then green bar, where the green bar will be greater then the last red bar.Last edited by papayax999; 06-30-2020, 12:04 PM.Tags: None
-
Hello papayax999,
Thank you for your note.
Since bar colors are determined by whether the close is higher or lower than the open of the bar, this would be very simple to do in an indicator. I've put together a quick example of how this could be accomplished in an indicator that you can then modify as you wish. This indicator will simply print a dot over any up bar (green) that is preceeded by two down bars (red).
Please let us know if we may be of further assistance to you.Attached Files
-
Appreciate it! that helped a lot. How could i make this a strategy and say, whenever i have this arrow shown, purchase 1 tick above, and place a BRACKET order of 1 point profit, 2 point stop loss? and that order will only last for the next bar, after that, the order closes if it doesnt long or short.Originally posted by NinjaTrader_Kate View PostHello papayax999,
Thank you for your note.
Since bar colors are determined by whether the close is higher or lower than the open of the bar, this would be very simple to do in an indicator. I've put together a quick example of how this could be accomplished in an indicator that you can then modify as you wish. This indicator will simply print a dot over any up bar (green) that is preceeded by two down bars (red).
Please let us know if we may be of further assistance to you.
I attached a word with a photo for an example.Attached FilesLast edited by papayax999; 06-30-2020, 08:48 PM.
Comment
-
Hello papayax999,
Thank you for your note.
To clarify, you're looking to enter one tick above the high of the green bar? You could certainly use the basic logic from the example indicator and put your entry logic inside that. Limit orders will be cancelled if they are not filled and the conditions for entry are no longer true, so it would be cancelled on the next bar if it hadn't filled and the original conditions aren't true anymore.
So, you could do something like this in the OnBarUpdate in a strategy (I used a long limit since in the original indicator you enter if the last 2 bars were down bars and then there's an up bar:
I would suggest trying the Strategy Builder to set up the code for you if you're not sure how to do so.Code:protected override void OnBarUpdate() { // check to make sure we have enough bars on the chart to check, if not, don't process if (CurrentBar < 3) return; // if the open is greater than the close of the preceding two bars and the open is less than the close of the current bar if (Open[2] > Close[2] && Open[1] > Close[1] && Open[0] < Close[0]) { //this will draw a dot above the green up bar. Draw.Dot(this, "Dot "+CurrentBar, true, 0, High[0] + (2*TickSize), Brushes.Goldenrod); //this will place a limit order 1 tick above the high of the current bar EnterLongLimit(High[0] + (1 * TickSize)); } }
Here's a link to our publicly available YouTube channel that goes over using the Strategy Builder to create simple strategies:
Strategy Builder 301
Also, here is a set of specific tutorials for creating conditions in the NinjaTrader 8 Strategy Builder in the NinjaTrader 8 help guide.
Condition Builder
Please let us know if we may be of further assistance to you.
Comment
-
No, id look at entering 1 tick below the red bar, where the red arrow is pointing downward. I would place a short order 1 tick from the red bars low. I will take a look at this , appreciate it!Originally posted by NinjaTrader_Kate View PostHello papayax999,
Thank you for your note.
To clarify, you're looking to enter one tick above the high of the green bar? You could certainly use the basic logic from the example indicator and put your entry logic inside that. Limit orders will be cancelled if they are not filled and the conditions for entry are no longer true, so it would be cancelled on the next bar if it hadn't filled and the original conditions aren't true anymore.
So, you could do something like this in the OnBarUpdate in a strategy (I used a long limit since in the original indicator you enter if the last 2 bars were down bars and then there's an up bar:
I would suggest trying the Strategy Builder to set up the code for you if you're not sure how to do so.Code:protected override void OnBarUpdate() { // check to make sure we have enough bars on the chart to check, if not, don't process if (CurrentBar < 3) return; // if the open is greater than the close of the preceding two bars and the open is less than the close of the current bar if (Open[2] > Close[2] && Open[1] > Close[1] && Open[0] < Close[0]) { //this will draw a dot above the green up bar. Draw.Dot(this, "Dot "+CurrentBar, true, 0, High[0] + (2*TickSize), Brushes.Goldenrod); //this will place a limit order 1 tick above the high of the current bar EnterLongLimit(High[0] + (1 * TickSize)); } }
Here's a link to our publicly available YouTube channel that goes over using the Strategy Builder to create simple strategies:
Strategy Builder 301
Also, here is a set of specific tutorials for creating conditions in the NinjaTrader 8 Strategy Builder in the NinjaTrader 8 help guide.
Condition Builder
Please let us know if we may be of further assistance to you.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
653 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 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
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment