I am using ninja trader 8. Is there any way to get 1 and half tick in an instrument? for example i want to know if the price is above a constant value for 1 and half of tick or less than a constant value for 3 quarter of a tick.
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
Get half tick
Collapse
X
-
Get half tick
Hi there
I am using ninja trader 8. Is there any way to get 1 and half tick in an instrument? for example i want to know if the price is above a constant value for 1 and half of tick or less than a constant value for 3 quarter of a tick.Tags: None
-
Hello amiralimadadi,
Thanks for your inquiry.
TickSize can be used to get instruments tick value. If I am understanding your inquiry correctly, you could perform math similar to the following: MyConst * (1.5 * TickSize) and compare against a Price Series.
Publicly available documentation can be found below.
TickSize - https://ninjatrader.com/support/help.../?ticksize.htm
Price Series - https://ninjatrader.com/support/help...ice_series.htm
Please let us know if we can be of further assistance.JimNinjaTrader Customer Service
-
I guess i could not explain the problem well.
Suppose that you have a series and the strategy tells you that if the price is upper than a value (for example 114.4123) for 2 ticks, you should enter trade. It's OK. In OnBarUpdate you can check Close[0] and Close[1] and if they both are upper than that value you enter the trade.
But my strategy says that if the price is upper than a value for 1.5 tick, enter the trade. I want to know how to catch 0.5 tick? Is OnBarUpdate a good event for this? Should i change the event ? or anything else.
thank you and sorry for long question
Comment
-
-
Hello amiralimadadi,
Ticks are the smallest amount of market movement and OnBarUpdate() is event based rather than being time based. We could not wait for one and a half ticks to pass, because OnBarUpdate() will only update with as ticks come in, and we cannot see "half ticks."
If you are looking for time based events that can happen at your own interval, you could add a timer and attach your own event handler with TriggerCustomEvent() to handle your own time based events. An example implementing a timer with an event handler and TriggerCustomEnevt() can be found below. Please also the reference the associated documentation with this sample for a complete understanding.
SampleCustomEvent - https://ninjatrader.com/support/foru...ead.php?t=5965
Please let us know if you have any questions.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
57 views
0 likes
|
Last Post
by DynamicTest
Today, 08:25 PM
|
||
Started by ScottWalsh, Today, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Today, 07:40 PM
|
||
Started by olisav57, Today, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Today, 07:39 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
2 responses
19 views
0 likes
|
Last Post
by helpwanted
Today, 07:25 PM
|
||
Started by cre8able, Today, 07:24 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 07:24 PM
|
Comment