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
llamar al valor del tick del instrumento negociado
Collapse
X
-
Hola franatas,
Gracias por escribirnos hoy.
Tenemos capacidad limitada para proporcionar soporte de plataforma en español; sin embargo, hemos encontrado que este sitio https://www.deepl.com/es/translator puede traducir el inglés al español con buena calidad. Por favor copie nuestra respuesta y luego navegue al sitio que le colocamos para pegar la respuesta en el cuadro hacia la izquierda.
So I may accurately assist, what exactly are you referring to when you mention "how to call the instrument information"?
Do you want to add additional data series to a strategy using the AddDataSeries() method?
Are you trying to get the price information of the instrument the chart is running on?
Do you simply want to print out the instrument name that the script is running on?
I look forward to assisting further.Brandon H.NinjaTrader Customer Service
-
Hello franatas,
Thanks for your notes.
To get price information, you could use the PriceSeries collection. To get the current Close price, Close[0] would be used. To get the current Open price, Open[0] would be used. To get the Low price, [Low[0] would be used. To get the High price, High[0] would be used.
See this help guide page for more information: https://ninjatrader.com/support/help...riceseries.htm
TickSize could be used to offset a price by a set number of ticks. For example, to offset the Close price by 5 ticks the code might look something like this:
Close[0] + 5 * TickSize
or
Close[0] - 5 * TickSize
See this help guide page for more information about TickSize and sample code: https://ninjatrader.com/support/help...8/ticksize.htmBrandon H.NinjaTrader Customer Service
Comment
-
perdona, igual no se explicarme, lo que necesito es obtener el valor del tick por ejemplo de ES 12.5$ o del CL 10$ es decir el valor del punto dividido por los tick que componen un punto;
yo vengo de atas y en esa api se obtenia con TickCost
entonces la formula quedaba asi : ContratosBuy = Math.Floor(Perdida_Max / (((PrecioEntrada - StopLoss) / TickSize) * TickCost));
Comment
-
Hello franatas,
Thanks for the clarification.
This value would need to be calculated in your script by multiplying the instrument's point value (Bars.Instrument.MasterInstrument.PointValue) by TickSize.
For example, the code might look something like this:
double tickValue = Bars.Instrument.MasterInstrument.PointValue * TickSize;
Print("tickValue: " + tickValue);
When this is added to a script that is applied to the ES 06-23 instrument, you will see a value of 12.5 print to a New > NinjaScript Output window.
See the help guide documentation below for more information
PointValue:https://ninjatrader.com/support/help...pointvalue.htm
TickSize: https://ninjatrader.com/support/help...8/ticksize.htmBrandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RaddiFX, Yesterday, 09:55 PM
|
3 responses
25 views
0 likes
|
Last Post Today, 09:15 AM | ||
Started by geotrades1, Today, 08:33 AM
|
2 responses
9 views
0 likes
|
Last Post
by geotrades1
Today, 09:09 AM
|
||
Started by samish18, 04-17-2024, 08:57 AM
|
23 responses
110 views
0 likes
|
Last Post Today, 09:04 AM | ||
Started by Orion815, Today, 08:39 AM
|
1 response
4 views
0 likes
|
Last Post Today, 09:03 AM | ||
Started by dcriador, Today, 08:56 AM
|
0 responses
5 views
0 likes
|
Last Post
by dcriador
Today, 08:56 AM
|
Comment