Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SetStopLoss Strategy
Collapse
X
-
Welcome to our forums here Mark, unfortunately we would not have a sample exactly for this case, however a more general approach to show how trailing stops would be setup using SetStopLoss() is seen here - http://www.ninjatrader.com/support/f...ead.php?t=3222BertrandNinjaTrader Customer Service
-
Stop as % of previous range
hi
I'm new to NT as well, working my way through automation. Im trying to build a strategy that sets a profit target as a percentage (100%) of the previous bar with previous bar being difference between high -low.
If the candle that has just closed is 50 pips, I would enter say +5 pips above, then add 50 pips to that price for profit target - and conversely set a stop loss as just under the low of previous bar (50 pips below).
Any hints?
Thanks
Michael
Comment
-
I did send you a reply, thanks. I am not sure how to record range of previous bar as a variable, which I can then use to set stops & profit targets. Can this be done in the strategy builder rather than actual coding?
Michael
Comment
-
Ok, will check your reply in a sec - you could record values into user variables in the wizard and then use them in your conditions - http://www.ninjatrader-support.com/H...nedInputs.htmlBertrandNinjaTrader Customer Service
Comment
-
-
Here's what I've done.
Ive set Variable0 to low of the bar, ticks, offset -50
Variable1 to high of the bar, percent offset1
As we're on the trigger bar, I have barsago set to 0, as this is the range of the bar I want to measure. I now want to place a stop @ 100% of the range between the high and low, and the stop @ 5 pips under the low.
Using the variables above I have tried to set the profit target and stop loss strategy but nothing happens on the chart.
Where to from here?
Thx
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by adeelshahzad, Today, 11:49 AM
|
6 responses
23 views
0 likes
|
Last Post
by mcosta72
Today, 04:35 PM
|
||
Started by sidlercom80, 05-05-2020, 07:20 AM
|
4 responses
304 views
0 likes
|
Last Post
by Bidder
Today, 04:35 PM
|
||
Started by andrew56, 11-21-2017, 11:57 AM
|
6 responses
954 views
0 likes
|
Last Post
by Bidder
Today, 04:34 PM
|
||
Indicator categories collapse, CategoryDefaultExpanded/CategoryExpanded has no effect
by Shai Samuel
Started by Shai Samuel, 08-09-2022, 04:41 AM
|
6 responses
184 views
1 like
|
Last Post
by Bidder
Today, 04:32 PM
|
||
Started by TheTradingMantis, 10-31-2017, 03:18 PM
|
5 responses
1,251 views
0 likes
|
Last Post
by TheAngryCube
Today, 04:06 PM
|
Comment