Please let us know what you expect offset to be doing here.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Problem showing arrows and sounds on strategy wizards
Collapse
X
-
Offset sar
Hi Ryan, tied to capture whole screen but as 3 meg and said file was too big to save. So what this screen shows is on offset of the SAR. If I plot this SAR strategy on the chart to replace the offset SAR you see on the image it wont offset but appear one bar over to the right. The triangle will just follow the SAR so not worried about that one. Cheers. DJ.
Code from SAR strategy. Even though I offset SAR does not show in code from strategy wizard:
/ Condition set 1
if (CrossBelow(Close, ParabolicSAR(0.015, 0.4, 0.04), 1)
&& Close[0] < EMA(34)[0])
{
DrawTriangleDown("My triangle down" + CurrentBar, false, 0, Close[0] + 20 * TickSize, Color.Red);
PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Russell SAR Sell signal.wav");
}
Comment
-
I think what you are after instead is displacement. The offset only applies to the vertical axis. If you'd like to change the visual position of indicators relative to the bars they're calculated from, this is displacement.
Displacement can only be set by hard coding this value in the Indicators Initialize() method or setting through the GUI when you add an indicator to your chart.
Ryan M.NinjaTrader Customer Service
Comment
-
Hi Ryan, ok, thanks for clarifying. Ok so now I have no put displacement in as per your example but still now working. Actually the code wont compile at all. Says in the error code it needs a name, not sure why the term displacement needs to be defined. Any ideas on this one? Thanks. DJAttached Files
Comment
-
Sar
Oh. So is it possible to put the code below in the indicator? If not are you saying it is impossible to dispalce an arrow and sound file based on a displaced SAR indiactor? Thanks
// Condition set 1
if (CrossBelow(Close, ParabolicSAR(0.015, 0.4, 0.04), 1)
&& Close[0] < EMA(34)[0])
{
DrawTriangleDown("My triangle down" + CurrentBar, false, 0, Close[0] + 20 * TickSize, Color.Red);
PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Russell SAR Sell signal.wav");
}
// Condition set 2
if (CrossAbove(Close, ParabolicSAR(0.015, 0.4, 0.04), 1)
&& Close[0] > EMA(34)[0])
{
DrawTriangleUp("My triangle up" + CurrentBar, false, 0, Close[0] + -20 * TickSize, Color.Lime);
PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Russell SAR Buy signal.wav");
Comment
-
Hello djkiwi,
Yes, what you are seeing is hard coded into NinjaTrader and cannot be customized.
Conditions are evaluated each bar. If there's any action to take when true, then those actions will take place on the next bar following the condition. Actions could be order placement or arrow drawing. There's no way to customize this behavior on an historical basis.
When running in real-time, you can set CalculateOnBarClose to false to have actions processed on the same bar when true.Ryan M.NinjaTrader Customer Service
Comment
-
Market analyzer not showing same as chart indicators
Hi Ryan, I have setup market analyzer to action sound alerts when momentum, macd, Dm cross different thresholds. These work fine. The problem though is when I compare the indicators numbers in analyzer v the numbers on the chart they are often materially different. For example analyzer may show 3 for momentum but chart will show 1. I am using Renko 6 charts and calculate=false. All of the parameters are exactly the same as I have triple checked. Now if I edit a column in analzyer and apply then all is ok but then over time the analyzer and the chart drift apart. I am now not sure which one is correct or why the results are different.
Any ideas on this one?
Cheers
DJ
Comment
-
Most likely need to double check some settings here.
- Market Analyzer is using exact same session template as chart
- Indicator on market analyzer is using correct series
- Check that the same bars back is loaded as renko charts is heavily dependent on bars loaded.
Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment