Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Break Even with Strategy Editor or Strategy Builder
Collapse
X
-
Break Even with Strategy Editor or Strategy Builder
Hi, I am trying to code a breakeven into my strategy once the instrument is 20ticks up from my initial position. Here is the code for my strategy. If anybody can help me add breakeven code or has an example I would love your help. Thank you!Tags: None
-
Hello Cubanaso24,
Thank you for writing in.
You can use exit order methods and adding coding logic in the Strategy Builder to accomplish this goal. Please note that you would not be able to use the exit methods and the stops in the stop and targets window as that creates a violation of the managed approach internal order handling rules, linked here: https://ninjatrader.com/support/help...d_approach.htm
My colleague Chelsea has created educational examples of strategy builder breakeven and trailing stop in the strategy builder here:
https://ninjatrader.com/support/foru...der#post806596
Please let us know if we may assist further.Brandon H.NinjaTrader Customer Service
-
Hi,
I am about to attempt to incorporate into my strategies for example taking a position with more then 1 contract, for illustration purposes let's say 5 contracts/units. The objective is to place limit orders for the first two contracts for example at for argument +10 and +20 rick stops, then I'd like to move the stops on the remaining 3 to at least break even the idea being to get out of 1 of the remaining 3 on a color change on a Unirenko bar or a 5 bar low, or maybe 18 ema, then the remaining two at a trailing pivot or possibly the other side of a Ichimoku cloud.
The question I have is what is the recommended way to do this. should it all be done ideally in the strategy builder, or in a predefined ATM setup that gets invoked within the code.
To have this kind of order granularity is it necessary to user labels for each entry and exit or can it be done without labels in code or without labels in the predefined ATM. I'm definately not a proficient C sharp coder and so far getting just about everything I need out of the strategy builder.
I have another question in order to solve the what I will call the time of day bias problem, meaning what strategy does well between 8am and 11 am in most markets does not do well in the pre London and Tokyo, New York hours. I use very short term bars renko, unirenko, range bars so a time template would provide enough data to have a valid setup working.
Should I filter the available hours by utilizing a time template or using the code determine when to send a trade?
Thank you very much,
glen
Comment
-
Hello demarcog,
Thank you for your note.
The strategy you described would likely be able to be created using the Strategy Builder.
Yes, you would need to define signalNames for each entry order and reference those signalNames in the fromEntrySignal property when exiting orders to ensure that specific order is being exited.
See the example in this help guide link for information about scaling in and out of a position in a strategy - https://ninjatrader.com/support/help...a_position.htm
You could use Time comparisons or a Time Filter to determine when the strategy will place trades.
See the help guide documentation below for more information.
Time comparisons - https://ninjatrader.com/support/help...imeComparisons
Time Filter - https://ninjatrader.com/support/help...ateTimeFilters
Let us know if we may assist further.Brandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Aviram Y, Today, 05:29 AM
|
0 responses
1 view
0 likes
|
Last Post
by Aviram Y
Today, 05:29 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
3 responses
25 views
0 likes
|
Last Post Today, 05:23 AM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
7 responses
34 views
0 likes
|
Last Post Today, 05:15 AM | ||
Started by cls71, Today, 04:45 AM
|
0 responses
6 views
0 likes
|
Last Post
by cls71
Today, 04:45 AM
|
||
Started by mjairg, 07-20-2023, 11:57 PM
|
3 responses
216 views
1 like
|
Last Post
by PaulMohn
Today, 04:22 AM
|
Comment