This question was already asked several times but I cannot find any precise answer. In NT7 script there existed property 'PriceType'. It is absent in NT8. In NT8 it is still possible to set input price type in GUI: Indicator > Properties > Data series > Input series > Properties > Parameters > Price type. Question is, how can we access this GUI selection inside script code of indicator? Please advise. Thank you.
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
How to find selected price type inside code of indicator?
Collapse
X
-
How to find selected price type inside code of indicator?
Hello
This question was already asked several times but I cannot find any precise answer. In NT7 script there existed property 'PriceType'. It is absent in NT8. In NT8 it is still possible to set input price type in GUI: Indicator > Properties > Data series > Input series > Properties > Parameters > Price type. Question is, how can we access this GUI selection inside script code of indicator? Please advise. Thank you. -
Hello bzinchenko,
I believe this was best answered by Paul in the following post: https://ninjatrader.com/support/foru...30#post1044830
Going forward, rather than having a UI selection you would need to just specify the series to be used such as Median or Close. You could create a PriceType enum if you wanted to make a selection which affects the logic using these prices. https://ninjatrader.com/support/help...ned_parame.htm
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Hello Jesse
Thank you for the link. I ve read it carefully before asking my question. This link does not provide the answer. My question is not how to pass specific series to indicator but how to find the choice, which user made in GUI from ninjascript code. Situation: user can choose price type in GUI but we have no way to know the choice. Hope it clarifies my question Please advise. Thank you.
Comment
-
Hello bzinchenko,
Going back to your first post with the GUI option for the indicator, that is simply passing that type of data as the Input to the indicator however the indicator still does not know what type of data was passed. It only has a Series<double> as its Input which has no other relevant information on what series it was.
If you specifically what to have a choice in the script to pick a price type, this is something you would need to make now by using an Enum and property and controlling your logic accordingly. Because the Input is just a Series your script would be unaware of what has been selected in the GUI you are referring to. This is noted in the help guide code breaking changes that there was nothing created in NT8 to match the PriceType NT7, going forward you would need to make changes to accommodate that.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
- Likes 1
Comment
-
Hello Jesse
Your last comment answers my question.
In my view, it is quite inconvenient and not logical.
But, at least, it is simple and clear answer. Thank you.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cocoescala, 10-12-2018, 11:02 PM
|
6 responses
939 views
0 likes
|
Last Post
by Jquiroz1975
Today, 06:51 AM
|
||
Started by gbourque, Today, 06:39 AM
|
1 response
4 views
0 likes
|
Last Post Today, 06:50 AM | ||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
1 response
17 views
0 likes
|
Last Post Today, 06:16 AM | ||
Started by benmarkal, Yesterday, 12:52 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 05:22 AM | ||
Started by helpwanted, Today, 03:06 AM
|
1 response
20 views
0 likes
|
Last Post Today, 03:35 AM |
Comment