As we code on NT8 Crossover of Close series against trend indicator ,But how can we generate signals on crossover of line charts with trend line?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to trade on crossover of line chart
Collapse
X
-
How to trade on crossover of line chart
hI,
As we code on NT8 Crossover of Close series against trend indicator ,But how can we generate signals on crossover of line charts with trend line?Tags: None
-
Hello shankar.deshapande,
Thanks for your post.
I have moved this forum thread to the NinjaTrader 8 Strategy Development section of the Forums since it seems you are programming a NinjaScript strategy.
To clarify, are you wanting to detect if the Close price crosses above/below a trend channel drawing object that you are drawing on the chart?
A TrendChannel drawing could be drawn on the chart by calling Draw.TrendChannel().
To detect a drawing object on the chart and get information about that drawing object you could use the DrawObjects collection to either find a draw object by a specific tag name or by looping through the DrawObjects collection to find specific Draw objects.
Once you get the price of a Draw objects chart anchor, you could use that price for your crossover conditions.
See the help guide documentation below for more information and sample code.
Draw.TrendChannel(): https://ninjatrader.com/support/help...b=trendchannel
DrawObjects collection: https://ninjatrader.com/support/help...sub=drawobject
IDrawingTool values: https://ninjatrader.com/support/help...rawingtool.htm
If you are referring to using the SuperTrend indicator for crossovers, you could use the plot of the SuperTrend indicator to detect if the Close price crosses above/below the plot value of the SuperTrend indicator. This is similar to detecting if the Close price crosses above/below the SMA indicator plot in the SampleMACrossover script.
To view the SampleMACrossover strategy, open a New > NinjaScript Editor window, open the Strategies folder, and double-click the SampleMACrossover file.
CrossAbove(): https://ninjatrader.com/support/help...crossabove.htm
CrossBelow(): https://ninjatrader.com/support/help...crossbelow.htmLast edited by NinjaTrader_BrandonH; 08-20-2023, 02:27 PM.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment