Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Super Trend For Ninja Trader Needed
Collapse
X
-
Dear Tamas,
I don't know what went wrong when I tested first time but it is working fine now. Code is as follows.
if (CrossAbove(Close, DownTrend[1],1))
Alert("myAlert1", NinjaTrader.Cbi.Priority.High, "buy triggered",
"Alert2.wav", 10, Color.Black, Color.Yellow);
else
if (CrossBelow(Close, UpTrend[1],1))
Alert("myAlert2", NinjaTrader.Cbi.Priority.High, "sell triggered",
"Alert2.wav", 10, Color.Black, Color.Yellow);
-
badasan,Originally posted by badasan View PostThank you very much roonius,
It now compiles fine. However, instead of making audio alert once
only when it crosses, it is continuously making audio alert. I have no idea
how to fix it. If not very difficult, it may be nice if you can add audio
alert option to the code. Thanks a lot.
what does your alert() method contain?
Leave a comment:
-
Thank you very much roonius,
It now compiles fine. However, instead of making audio alert once
only when it crosses, it is continuously making audio alert. I have no idea
how to fix it. If not very difficult, it may be nice if you can add audio
alert option to the code. Thanks a lot.
Leave a comment:
-
if (CrossAbove(Close, DownTrend[1],1)) alert(); for buyOriginally posted by badasan View PostHi advanced programmers!
I added the following line to get audio alert when buy or sell signal
is generated but I got the compile errors. Could someone tell me how
to fix the problem? Thanks in advance.
if (CrossAbove(Close[0], DownTrend[1],1)) alert(); for buy
if (CrossBelow(Close[0], UpTrend[1],1)) alert(); for sell
Compiling error says
The best overloaded method match for 'CrossAbove' has some invalid arguments.
Argument "2": cannot convert from 'double' to 'IDataSeries'
if (CrossBelow(Close, UpTrend[1],1)) alert(); for sell
Leave a comment:
-
Hi advanced programmers!
I added the following line to get audio alert when buy or sell signal
is generated but I got the compile errors. Could someone tell me how
to fix the problem? Thanks in advance.
if (CrossAbove(Close[0], DownTrend[1],1)) alert(); for buy
if (CrossBelow(Close[0], UpTrend[1],1)) alert(); for sell
Compiling error says
The best overloaded method match for 'CrossAbove' has some invalid arguments.
Argument "2": cannot convert from 'double' to 'IDataSeries'
Leave a comment:
-
Thank you for the suggestion. To access BoolSeries right now you have to custom program your strategy.
Leave a comment:
-
I'm not sure which code you exactly refer to, most likely you would need to this outside the wizard by custom programming in the NinjaScript editor.
Leave a comment:
-
How would I go about entering the code that totexal submitted? I would like to see what this would look like in the stratagy wizard for my own education .
Thanks
PS Is there already a stratagy for this posted that I may have missed?
Leave a comment:
-
You will not be able to modify the code generated by the Strategy Wizard unless you unlock the code. If you unlock the code you will not be able to go back to the Wizard.
Leave a comment:
-
Supertrend Stratagy
I am Trying to make a stratagy from supertrend and tried to copy and paste tortexal code but in the strategy wizard-view code it does not let me paste? I am new to the stratagy wizard and have attended the webinar, but trying to figure this out is way over my head. Could some of you lend me a hand?
Cheers
Leave a comment:
-
geotabs, unfortunately you would need to custom code this to work the way you had in mind.
Leave a comment:
-
Market Analyzer
How do you get this to work in Market Analyzer? What values do you use? Can't seem to figure it out. I want to have it color cell if crosses over or under trailing line on 5 min. I'm sorry but I don't know how to program
Thanks for any help
Cheers
Leave a comment:
-
dsherman, unfortunately I'm not familiar with the custom code you use, but if you just type the indicator name and start the paramterts entry with the left curly bracket ( Intellisense would come to help with the available overloads for this....
Leave a comment:
-
Trying to create an indicator, I'm stuck here:
If I add: "if(TSSuperTrend(Parameters).Trend[0] && !SuperTrend(Parameters)[1])"
I get multiple error messages:
"No overload for method 'TSSuperTrend' takes '1' arguments"
"No overload for method 'SuperTrend' takes '1' arguments"
I then tried the following:
if ((TSSuperTrend(Length, TradingStudies.NinjaScript.Utility.MovingAverageTy pe.SMA, Multiplier, Smooth, TradingStudies.NinjaScript.Utility.SuperTrendMode. ATR).Trend[0] && !SuperTrend(Length, Multiplier)[1]))
However, I get the error message: "Operator '!' cannot be applied to operand of type 'double'"
Originally posted by roonius View PostVelocity,
Thanks.
You don't need to add any additional "signal"
TSSupertrend already has a boolseries:
Uptrend:
Downtrend:Code:if(TSSuperTrend(Parameters).Trend[0]) { //we are in uptrend }
Fresh cross up:Code:if(!TSSuperTrend(Parameters).Trend[0]) { //we are in downtrend }
Fresh cross down:Code:if(TSSuperTrend(Parameters).Trend[0] && !SuperTrend(Parameters)[1]) { //Trend just changed direction up }
Code:if(!TSSuperTrend(Parameters).Trend[0] && SuperTrend(Parameters)[1]) { //Trend just changed direction down }Last edited by dsherman; 08-08-2009, 07:02 PM.
Leave a comment:
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
668 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
377 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 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
575 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
580 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Leave a comment: