Thanks
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
Indicator syntax
Collapse
X
-
Thank you for your question, .
I am taking this to mean that you have indicators open in multiple charts and would like to pass messages between them. If this is the case, I am including a publicly available link from the MSDN C# documentation which will guide you toward putting together a global scope file in NT8.
The C# namespace alias qualifier `::` is used to access a member of an aliased namespace. The `::` operator is often used with the `global` alias, an alias for the global namespace
If on the other hand you would like to duplicate an indicator in one chart into another chart, you can right-click on the chart tab at the bottom and select "Duplicate in new window" or "Duplicate in new chart"
Please let us know if there are any other ways we can help.Jessica P.NinjaTrader Customer Service
-
I have not been able to access the Hashtable from the chart that receives the information, I use the statement "colAlias :: Hashtable test = new colAlias :: Hashtable ();"
I think when I use the "new" sentence, I create it again and delete the previous content
Thanks for your help, regards, Alejandro
Pd: sorry for my writing in English ...
Comment
-
I have noticed you are using syntax common to other languages such as C++. In C#, the hash table object is known as a Dictionary and is publicly documented here.
I have included an example where two indicators pass messages back and forth. Please let us know if there are any other ways we can help.Last edited by NinjaTrader_JessicaP; 05-09-2017, 07:10 AM.Jessica P.NinjaTrader Customer Service
Comment
-
Thanks for your reply Jessica, I can not compile the example you sent me, apparently I'm missing Dataannotations, Tasks, Input, Media, Tools, Floatingpoint, which are defined in declarations, I'm using ninja trader
7 .0.1000.34, I have to load something else ?.
Regards, Alejandro
Comment
-
Thank you for this information Alejandro. If you are in NinjaTrader 7, you will not be able to use those samples directly, as they are designed for NinjaTrader 8. However the concepts illustrated will transfer over to NinjaTrader 7. I am happy to answer any questions about the contents. Code samples we provide are for educational purposes, and are not intended for live trading, and are not guaranteed to accomplish any user goal or to be maintained. For convenience, these are the key parts to each file.
From A :
Code:[FONT=Courier New] private static Object InUse = new Object(); public static string Reply(string msg) { string output = msg; lock(InUse) { output += " jumps over the lazy dog"; } return output; }[/FONT]
Code:[FONT=Courier New] protected override void OnBarUpdate() { Print(Indicators.Example1705514A.Reply("The quick brown fox")); }[/FONT]
Last edited by NinjaTrader_JessicaP; 05-09-2017, 10:28 AM.Jessica P.NinjaTrader Customer Service
Comment
-
Hi Jessica, thank you very much for all your help, I already achieved my goal, I use global variables to pass information between charts.
It also proves the statements that I send to pass information between indicators and I worked well.
Regards, Alejandro R. Troelsen
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Brevo, Today, 01:45 AM
|
0 responses
6 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by aussugardefender, Today, 01:07 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
242 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
384 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
||
Started by oviejo, Today, 12:28 AM
|
0 responses
6 views
0 likes
|
Last Post
by oviejo
Today, 12:28 AM
|
Comment