Can anyone get me started.
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
Trix
Collapse
X
-
In your indicator, use DrawArrowUp(). http://www.ninjatrader-support.com/H...awArrowUp.html
Then be sure to use DrawOnPricePanel = true;
Josh P.NinjaTrader Customer Service
Comment
-
How do I tell it to do this when the TRIX MA line crosses the signal line?
// Initialize method of a custom indicator
protected override void Initialize()
{
Add(new Plot(Color.Orange, "tag1"));
DrawOnPricePanel = true; // Draw objects now paint on the indicator panel itself
// Paints a red down arrow on the current bar 1 tick below the low
DrawArrowUp("tag1", true, 0, Low[0] - TickSize, Color.Red);
Comment
-
rtj4201,
You should not place such logic in Initialize(). Please move your DrawArrow line of code into the OnBarUpdate() method. From there you can code an if-statement to draw the arrow.
Untested code.
Code:if (CrossAbove(TRIX(20, 3).Default, TRIX(20, 3).Signal, 1)) DrawArrowUp(...);
Josh P.NinjaTrader Customer Service
Comment
-
trix with arrow
note: you can safely comment out plot1, plot0 color codes, they don't do anything.Attached Files
Comment
-
Originally posted by rtj4201 View PostCan you update it so that it gives a down arrow when TRIX crosses below the signal line?
// if (CrossBelow(TRIX(period, signalPeriod).Default, 0,1))
if (CrossBelow(TRIX(period, signalPeriod).Default, TRIX(period, signalPeriod).Signal, 1))
DrawArrowDown("MyArrowDown"+CurrentBar, 0, High[0]+2* TickSize, Color.Orange);
// if (CrossAbove(TRIX(period, signalPeriod).Default, 0,1))
if (CrossAbove(TRIX(period, signalPeriod).Default, TRIX(period, signalPeriod).Signal, 1))
DrawArrowUp("MyArrowUp"+CurrentBar, 0, Low[0] -2* TickSize, Color.Red);
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Waxavi, 04-19-2024, 02:10 AM
|
4 responses
54 views
0 likes
|
Last Post
by sonia0101
Today, 04:02 PM
|
||
Started by cmtjoancolmenero, Today, 03:58 PM
|
0 responses
5 views
0 likes
|
Last Post Today, 03:58 PM | ||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
11 responses
1,777 views
0 likes
|
Last Post
by aligator
Today, 03:54 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
1 response
8 views
0 likes
|
Last Post Today, 03:16 PM | ||
Started by geddyisodin, Today, 05:20 AM
|
6 responses
37 views
0 likes
|
Last Post
by geddyisodin
Today, 03:14 PM
|
Comment