Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Break Even + logic example
Collapse
X
-
Break Even + logic example
I have been searching for a logic for break even + ticks code. This is something I have yet to code and would like examples if possible. I have tried one example found online but it keeps positions from being entered. Tha KS in advance !Tags: None
-
Hello Teebone21,
Thanks for your post.
There are some Strategy Builder examples that can be referenced in the Strategy Builder, and then their code may be examined when clicking View Code:
https://ninjatrader.com/support/foru...der#post806596
We also have an educational example that shows how to use SetStopLoss to move the stop loss to create your own Breakeven or Auto Trail behaviors:
https://ninjatrader.com/support/help...of_stop_lo.htm
Please note that if you are using SetStopLoss in OnBarUpdate, SetStopLoss should be called with initial values when you are flat, before your next Enter() is submitted. This ensures the stop loss is at an appropriate level when you make your entry.
Let us know if you have any additional questions.
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
81 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
66 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment