I ask because it is not clear if the shift is simply for the visual appearance of the plot or if the calculations are done on the new shifted position. Are the new numbers/values from N1 for example now in Bar (0)?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Displacement
Collapse
X
-
Displacement
If I use displacement of x bars on and indicator, I know it shfts the plot that much. If I use that indicator for an action such as a trailing stop or some calculation, how will NT use the shift. Will the trade bar (0) be "seeing the non-shifted value or the shifted value.
I ask because it is not clear if the shift is simply for the visual appearance of the plot or if the calculations are done on the new shifted position. Are the new numbers/values from N1 for example now in Bar (0)?Tags: None
-
iluvit, welcome to the forums! The displacement just uses the values from the plot/indicator by the number of bars back as specified by the displacement. It doesn't actually shift the plot, unless you create an indicator to use the shifted values. I do not believe it is possible to use displacement with trailing stops. What are you trying to displace?AustinNinjaTrader Customer Service
-
displacement question update
Well there are several indicators whose plot when used as the value for the stop loss acts like a trailing stop. The ADXVMA is a good example but it is a bit too tight for my style in some instances but by shiifting it a bit it becomes a perfect trail for me and would prevent a full loss of a fixed trailing stop at the end of a run because you can configure it to tighten up nicely at the end of a run. I am wanting to do something like a bollinger band dynamic trailing stop. I can create a stop in the wizard that does this using the bollinger bands but I really want to test something else that is a bit smoother.
I am sorry to sound so ignorant but I am new to Ninja trader and am have to change my trading systems over to NT from the unreliable MT4 platform and am logging hundreds of hours learning NT from the ground up before I start trading it with real money.
My confusion on the issue it this. I can displace a plot and get very close to what I want with regard to the chart appearance. The ADXVMA for example in the displaced position and a little adjustment of its period lies pretty much where I would want a trail to run. It starts with some breathing room and then allows the runs to do their thing until exhaustion and tightens to just a few pips yet allows for a possible new leg of continuation if there is no reversal. Instead of losing 30-50 pips of hard earned gains, I could stop out for 8-15 pips. I am not sure though if the price hits the displaced plot line which I want to be the stop is the value actually read as my stop. It could still be the tradebar(0) value since that is the real time frame (active time frame). I think the tradebar (0) trade price is lined up with the ADXVMA (2) if I use a displacement of 2 and those values are plotted in the correct buffers and should be the stop price that I want but I do not want to spend hours getting this coded only to find that the displacement is only moving the plot image and not the values I want it to. So what I am rambling on about is that in actuality I want my stop to be the value of the ADXVMA 2, 3, or 4 bars ago. It would not be a big deal if it was for manual trading, but I am designing this as an part of an automated strategy.
I am also looking for code for a trailing stop that starts from the onset of the trade without having to wait on a trigger. I had this coded for metatrader and it performed circles around the trailing stop that did not kick in until it was in significant profits equal to the amount of the trail.
Thanks for you reply and input.
Rick
Comment
-
clarification re trailing stop plans
I am creating a condition (for long example) that says if the trade price >= the value of the ADXVMA(3) the exit the long positions that are open for that pair. This should work as one of the sets in the design of the strategy. I am creating the trailing stop strategy instead of the simplistic fixed trail.
I guess one other alternative is to create a custom trailing stop loss indicator and have a public double that would allow me to set the stop loss at a certain number of standard deviations from the close of the last bar. If it will work, the first method would be much easier and i would not have to do any manual coding and screw things up! LOL
Comment
-
Originally posted by iluvit View PostI want my stop to be the value of the ADXVMA 2, 3, or 4 bars ago. It would not be a big deal if it was for manual trading, but I am designing this as an part of an automated strategy.
I am also looking for code for a trailing stop that starts from the onset of the trade without having to wait on a trigger. I had this coded for metatrader and it performed circles around the trailing stop that did not kick in until it was in significant profits equal to the amount of the trail.
It is a method that sets a trailing stop that follows your entry by a certain amount (price, ticks, or percent). You can enter it at the end of the strategy generation wizard.AustinNinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Austin View PostIluvit, are you using NT 6.5 or NT7? In NT7, in the strategy wizard, you can specify exactly how many bars ago you'd like to pull a value from. Once you have this value, you can also shift it up or down with the offset setting.
Have you seen the SetTrailStop() method?
It is a method that sets a trailing stop that follows your entry by a certain amount (price, ticks, or percent). You can enter it at the end of the strategy generation wizard.
That is what I am doing in setting up the strategy and having it look back to the bar that I want for the trail.
Yes, I did the normal trail but just do not like it very much. The trail that I will use gets tighter as the exhaustion starts and momentum of the trend fades. This way my initial stop is fairly wide and will rid a strong trend without getting taken out by a minor retracement so often but in the end it is very tight and I do not lose such a big chunk of the gains on the trade. I had it working great on MT4 but I refuse to trade with that platform. This works a lot like the BB stop but I have not found that indicator or function in NT anywhere which is somewhat surprising. I appreciate your reply.
Comment
-
People have been working on a variety of trailing stop systems. Most are created as indicators that "swing" when the price reverses and then they trail up and tighten up the further along they are. The actual trailing stop order is then set to the price determined by these indicators. Unfortunately I don't have a set of links for these trail systems, but they are frequently discussed here on the forum. You could probably do a search for them and find a few good examples.AustinNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
10 responses
1,769 views
0 likes
|
Last Post
by Leafcutter
Today, 03:01 AM
|
||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, 04-23-2024, 07:51 PM
|
2 responses
30 views
0 likes
|
Last Post
by Max238
Today, 02:25 AM
|
||
Started by Shansen, 08-30-2019, 10:18 PM
|
24 responses
943 views
0 likes
|
Last Post
by spwizard
Today, 01:29 AM
|
||
Started by Max238, Today, 01:28 AM
|
0 responses
10 views
0 likes
|
Last Post
by Max238
Today, 01:28 AM
|
||
Started by rocketman7, Today, 01:00 AM
|
0 responses
7 views
0 likes
|
Last Post
by rocketman7
Today, 01:00 AM
|
Comment