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
-
I did this but it does not work:
// 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]+5* TickSize, Color.Red);
DrawText("MyText", "Sell", 0, High[0] + 6 * TickSize, Color.Red);
// 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] -5* TickSize, Color.Green);
DrawText("MyText", "Buy", 0, Low[0] - 6 * TickSize, Color.Green);
Comment
-
Originally posted by rtj4201 View PostI did this but it does not work:
here we go, this one is crossing zero line signal
// if (CrossBelow(TRIX(period, signalPeriod).Default, TRIX(period, signalPeriod).Signal, 1))
if (CrossBelow(TRIX(period, signalPeriod).Default, 0,1))
{
DrawArrowDown("MyArrowDown"+CurrentBar, 0, High[0]+2* TickSize, Color.Red);
DrawText("MyText"+CurrentBar, "Sell", 0, High[0] + 6 * TickSize, Color.Red);
}
// if (CrossAbove(TRIX(period, signalPeriod).Default, TRIX(period, signalPeriod).Signal, 1))
if (CrossAbove(TRIX(period, signalPeriod).Default, 0,1))
{
DrawArrowUp("MyArrowUp"+CurrentBar, 0, Low[0] -2* TickSize, Color.Orange);
DrawText("MyText"+CurrentBar, "Buy", 0, Low[0] - 6 * TickSize, Color.Green);
}Last edited by nkhoi; 03-15-2009, 03:04 PM.
Comment
-
Originally posted by rtj4201 View PostThe DrawArrows are small and similar to some of my other indicators and are hard to see.
Is there any way to modify the DrawArrow parameters to make the arrow larger?
Comment
-
replace your code with this, remember I am using cross zero line not cross signal line;
// if (CrossBelow(TRIX(period, signalPeriod).Default, TRIX(period, signalPeriod).Signal, 1))
if (CrossBelow(TRIX(period, signalPeriod).Default, 0,1))
{
DrawArrowDown("MyArrowDown"+CurrentBar, 0, High[0]+2* TickSize, Color.Red);
// DrawDot(CurrentBar.ToString(), 0, High[1] + 10 * TickSize, Color.Red);
// DrawText("MyText"+CurrentBar, true,"Sell", 0, High[0] + 12 * TickSize, Color.Red,pfont);
DrawText("V"+CurrentBar, true, sellText, 0, High[0] + 8 * TickSize, yPixels, sColor, pfont,
StringAlignment.Center, Color.Empty, Color.Empty, 10) ;
}
//if (CrossAbove(TRIX(period, signalPeriod).Default, TRIX(period, signalPeriod).Signal, 1))
if (CrossAbove(TRIX(period, signalPeriod).Default, 0,1))
{
DrawArrowUp("MyArrowUp"+CurrentBar, 0, Low[0] -2* TickSize, Color.Orange);
// DrawText("MyText"+CurrentBar, "Buy", 0, Low[0] - 6 * TickSize, Color.Green);
DrawText("V"+CurrentBar, true, buyText, 0, Low[0] - 10 * TickSize, yPixels, bColor, pfont,
StringAlignment.Center, Color.Empty, Color.Empty, 10) ;
}
also go to REGIONAL variables section, add this:
private string sellText = @"SELL";
private Font pfont = new Font("Arial", 12, FontStyle.Bold, GraphicsUnit.Point);
private Color sColor = Color.Red;
private string buyText = @"BUY";
private Color bColor = Color.Green;
private int yPixels = 10;Last edited by nkhoi; 03-16-2009, 10:12 AM.
Comment
-
Originally posted by rtj4201 View PostI want the arrow plot when the ma line crosses the signal line. How would that be coded?
// if (CrossBelow(TRIX(period, signalPeriod).Default, TRIX(period, signalPeriod).Signal, 1))
if (CrossBelow(TRIX(period, signalPeriod).Default, 0,1))
.....
change to:
if (CrossBelow(TRIX(period, signalPeriod).Default, TRIX(period, signalPeriod).Signal, 1))
// if (CrossBelow(TRIX(period, signalPeriod).Default, 0,1))
.....
see the different?
Comment
-
rtj4201,
You need to open up the indicator code and go through it yourself. Unfortunately we just do not have enough bandwidth to step you through actually modifying it.
As a hint, trying to change something like this requires you to completely change up the math logic.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, 04-23-2024, 07:51 PM
|
2 responses
30 views
0 likes
|
Last Post
by Max238
Today, 02:25 AM
|
||
Started by Shansen, 08-30-2019, 10:18 PM
|
24 responses
943 views
0 likes
|
Last Post
by spwizard
Today, 01:29 AM
|
||
Started by Max238, Today, 01:28 AM
|
0 responses
9 views
0 likes
|
Last Post
by Max238
Today, 01:28 AM
|
||
Started by rocketman7, Today, 01:00 AM
|
0 responses
7 views
0 likes
|
Last Post
by rocketman7
Today, 01:00 AM
|
||
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
28 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:43 PM
|
Comment