Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
dumb question
Collapse
X
-
Ok, now that I looked at this longer and worked in the debugger....the problem seems to be that when I access Time[0] it may be in a thread outside of Ninja's access....since I am using Background Worker and it starts a new thread (maybe another process??)
Because the Time[0] in OnBarUpdate is correct.
Time[0] in the other access seems to be the first bar of the data loaded.
-
If I could find how to send the signal direct from an indicator to a strategy I would remove the MSMQ...that would probably solve the problem.
Any C# gurus ....
Here is the requirement:
I wanted to decouple the Strategy from the trade signal source
A strategy that is listening for trade signals from multiple indicator (all on same instrument)
the Strategy can listen for signals from multiple source but once it has a signal it places an order and manages the trade...only one trade at a time
Any takers?
:-)
Leave a comment:
-
Yeah, I'm on my own with this one.
Just using this to think out loud....
The signal is passed back to the main process via BackgroundWorker ProgressChanged...so the order submission and all else should be in the main thread
I remember I had this working perfectly in NT7....but when I started the port to NT8 I removed the code from NT7 .....now the task is to see if I can find an old copy
In Visual Studio Debug it seems the Time[0] is always the time of the first bar in the Replay data that is loaded.... 1800 hours
Perhaps the new threading in NT8 has changed something
Leave a comment:
-
Hello vantojo,
Thanks for your reply.
I could not help you with Visual studio or Microsoft Messaging Queing.
I can tell you that Time[0] has not changed from NinjaTrader 7 to NinjaTrader 8 but it sounds like your use has.
If in doubt you can always Print time from the OnBarUpdate() as a sanity check.
Leave a comment:
-
Ok, I ran this in Visual Studio Debug....
and the Time[0] is not correct
BUT my code is unusual....I am using MSMQ to send the trade signal from an indicator to a background process running in the Strategy...which runs in a separate thread.
that background process is a Listener and when it gets a signal it places a trade and the Strategy then manages the Trade
works good, but I need to know Time[0] and perhaps this is why it is not correct
perhaps I need Time[0] in a public variable
Leave a comment:
-
Really strange, I'll have to debug more...thanks
thanks for the PDF ... most things I want to search for are core features....so the PDF should be alot easier...I don't know if it is just me, but the Search feature in the Online Ninja 8 documentation never seems to return (at the top of the list) what I'm looking for.
Leave a comment:
-
Hello vantojo,
Thanks for your post.
There would be no change in Time[0] from NT7 to NT8. Time[0] is the close time in date/time structure of the current bar.
The help guide is online so that we can provide continuous updates to the information presented which is substantially more than was provided in NT7. You can download a PDF of the help guide although we do not recommend this because of the updates we perform.
To download a pdf of the help guide:
1) go to this link: https://ninjatrader.com/Help-Connection-Guides
2) On the help guides click "view more"
3) Click on the link "NinjaTrader 8 Help Guide PDF"
Leave a comment:
-
dumb question
I'm converting a script from NT7 to NT8
in my testing Time[0].ToString() is not giving me what I expect from NT7....has it changed?
If so, can you point me to the new Bar/Bars object in help?
Also...I have more trouble finding things in the NT8 web based help...is there a way to download it into a pc based help system? The searching does not return well, in my perspective.
Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by robforee2, Today, 01:05 PM
|
1 response
7 views
0 likes
|
Last Post
|
||
Started by SpikeLGWG, Today, 12:35 PM
|
1 response
11 views
0 likes
|
Last Post
|
||
Started by Kaalhus, Today, 12:47 PM
|
2 responses
26 views
0 likes
|
Last Post
![]()
by Kaalhus
Today, 01:05 PM
|
||
Started by Johnny, Today, 11:55 AM
|
3 responses
21 views
0 likes
|
Last Post
|
||
Started by MGHORBEL, Today, 10:48 AM
|
0 responses
23 views
0 likes
|
Last Post
![]()
by MGHORBEL
Today, 10:48 AM
|
Leave a comment: