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
Clear Method Indicator
Collapse
X
-
Originally posted by NinjaTrader_AdamP View PostYou could probably find a way to make it work in an automated strategy, but an ATM strategy does not accept input from indicators.
Comment
-
StockJock,
Indicators and strategies have different namespaces they belong to so the two aren't totally interchangeable. They both use C# however, and you can call indicators in a strategy generally.
An ATM strategy is for managing orders (even manually placed orders), but can also be used in an automated strategy to manage orders it places. ATM strategies automatically manage stops, targets, break-evens, etc.
We have a strategy webinar you could attend that covers how to use the Strategy Wizard. The Strategy Wizard would require no programming to setup strategies, however some things are not possible with the Strategy Wizard vs. code.
Schedule of webinars : http://www.ninjatrader.com/webinars
If you are interested in learning to code NinjaScript, here is a good introductory video.
Download NinjaTrader FREE at http://www.ninjatrader.comThis video is a NinjaScript tutorial on creating a strategy based on overbought/oversold conditions of...
Also, our support forum has reference samples on how to code certain things.
Adam P.NinjaTrader Customer Service
Comment
-
When I try to import the indicator I get an error, but I don't know which file its referring to. I don't think its the one you just gave me.
You have custom NinjaScrip files on your PC that have programming errors. These errors must be resolved before you can import a NinjaScript Archive File.
Comment
-
StockJock,
Please follow the instructions below to see where the errors are coming from after compiling only one indicator. This will allow you to debug the offending indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader compiles all indicators and strategies- not just one.
Open NinjaTrader- From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
- Select an indicator and double click on it.
- A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
- At the bottom of the window a new section will appear where you can find the error locations.
- From there you have the option to remove the indicator or debug it.
If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.
To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.Adam P.NinjaTrader Customer Service
Comment
-
Hi
i'm trying to call this indicator for a really easy strategy.
sell if the ShortTermSwings goes down, target 40 ticks
here the code:
// Selling condition
if (ShortTermSwings().Trend[0] < ShortTermSwings().Trend[1])
{
EnterShort(DefaultQuantity, "Vente");
SetProfitTarget("Vente", CalculationMode.Ticks, 42*TickSize);
}
but i don't understand why after hitting 42 ticks, the indicator continue to go down and the script is not taking a new position (as shown on the picture below).
I think that i have to call the line of the indicator but i don't now the code to call it.
Can you help ?
Comment
-
Originally posted by Thomas79 View Post// Selling condition
if (ShortTermSwings().Trend[0] < ShortTermSwings().Trend[1])
{
EnterShort(DefaultQuantity, "Vente");
SetProfitTarget("Vente", CalculationMode.Ticks, 42*TickSize);
}
Interesting code. What indicator are you referencing with ShortTermSwings()?
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Belfortbucks, Today, 09:29 PM
|
0 responses
2 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
150 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
6 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
||
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
33 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
Comment