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
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
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.Brandon H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by port119, Today, 02:43 PM
|
0 responses
1 view
0 likes
|
Last Post
by port119
Today, 02:43 PM
|
||
Started by Philippe56140, Today, 02:35 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 02:35 PM | ||
Started by 00nevest, Today, 02:27 PM
|
0 responses
1 view
0 likes
|
Last Post
by 00nevest
Today, 02:27 PM
|
||
Started by Jonafare, 12-06-2012, 03:48 PM
|
5 responses
3,986 views
0 likes
|
Last Post
by rene69851
Today, 01:44 PM
|
||
Started by Fitspressorest, Today, 01:38 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 01:38 PM |
Comment