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
coloring premarket/afterhours sessions
Collapse
X
-
Originally posted by NinjaTrader_JessicaP View PostHello FightOn2, and thank you for your question.
I have prepared the attached indicator for educational purposes which will accomplish this. Please let us know if there are any other ways we can help.
I'm new to this and figured the script may work as is, which I could tweak from there if necessary. Any suggestions on resolving this error? Thanks!
Comment
-
Thank you for your question risteon. It sounds like something is happening with your compile environment, as the SessionColors script doesn't use any IComparable overloads.
These troubleshooting steps should help us track down exactly where this message is coming from so we can remove it. Please repeat these steps and report back if you continue seeing this message about IComparable
- First, please remove your existing copy of SessionColors.cs from your system.
- Next, in NinjaTrader, please visit New -> NinjaScript Editor
- Next, in the NinjaScript Editor, please press the F5 button to compile. If you do not hear a chime, and you see error messages at the bottom, please use the Windows Snipping Tool to take a picture of your NinjaScript editor, and attach it to your reply.
- Assuming you did hear a chime, please re-download SessionColors.cs and copy / paste it to Documents\NinjaTrader 8\bin\Custom\Indicators .
- Finally, please select your NinjaScript editor once more, and press F5 to compile. Just like last time, if you don't hear a chime, please send us a picture of your editor window.
One of my colleagues will be happy to help if there are any more questions we may answer.Jessica P.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_JessicaP View PostThank you for your question risteon. It sounds like something is happening with your compile environment, as the SessionColors script doesn't use any IComparable overloads.
These troubleshooting steps should help us track down exactly where this message is coming from so we can remove it. Please repeat these steps and report back if you continue seeing this message about IComparable
- First, please remove your existing copy of SessionColors.cs from your system.
- Next, in NinjaTrader, please visit New -> NinjaScript Editor
- Next, in the NinjaScript Editor, please press the F5 button to compile. If you do not hear a chime, and you see error messages at the bottom, please use the Windows Snipping Tool to take a picture of your NinjaScript editor, and attach it to your reply.
- Assuming you did hear a chime, please re-download SessionColors.cs and copy / paste it to Documents\NinjaTrader 8\bin\Custom\Indicators .
- Finally, please select your NinjaScript editor once more, and press F5 to compile. Just like last time, if you don't hear a chime, please send us a picture of your editor window.
One of my colleagues will be happy to help if there are any more questions we may answer.
I'll have to play around with it, as I would like to have a futures chart color the regular market session difference (9:30-4pm/eastern one color, everything else another color).
Comment
-
In case anyone interested, I did a simple modification to JessicaP's script to accept input of a fixed start and end time to define the session. Defaults set to 9:30am and 4:00pm (since I'm eastern time) to represent normal market hours. I did this since I like to see this represented on futures symbols as well (just personal preference).Attached Files
Comment
-
I don't know what to do with the CS file. In the user guide, the directions state that the import process expects a zip file. The ninja script editor is unavailable to me with the free license. Is the CS file loaded into the editor and then compiled? I don't mind doing my own reading but I couldn't find any material on the subject. Thanks.
Comment
-
Originally posted by leon of pizza View PostI don't know what to do with the CS file. In the user guide, the directions state that the import process expects a zip file. The ninja script editor is unavailable to me with the free license. Is the CS file loaded into the editor and then compiled? I don't mind doing my own reading but I couldn't find any material on the subject. Thanks.
- First, please remove your existing copy of SessionColors.cs from your system.
- Next, in NinjaTrader, please visit New -> NinjaScript Editor
- Next, in the NinjaScript Editor, please press the F5 button to compile. If you do not hear a chime, and you see error messages at the bottom, please use the Windows Snipping Tool to take a picture of your NinjaScript editor, and attach it to your reply.
- Assuming you did hear a chime, please re-download SessionColors.cs and copy / paste it to Documents\NinjaTrader 8\bin\Custom\Indicators .
- Finally, please select your NinjaScript editor once more, and press F5 to compile. Just like last time, if you don't hear a chime, please send us a picture of your editor window.
Comment
-
Thanks to all. I was able to load the CS file using a sim key Ryan gave me and I tried the other method with the zip files Patrick provided and it worked fine too. Thanks to risteon for making the time input a variable (not sure what the use of the first version is: all it does is shade the settlement session).
It creates over 1000 objects for a 30 day chart, and when I switch aggregation periods it takes over 20 sec to get sorted out. It seems to me that the feature could be added to whatever paints the background and it would use less resources there.
edit: 1000 objects for 30m bars. 30,000 objects for 1m bars. I tried changing the Calculate On variable - no help.
Comment
-
Hello leon of pizza,
Thank you for your response.
Utilizing the OnRender function to use custom rendering would improve performance of the indicator. You can find details on OnRender at the following link: https://ninjatrader.com/support/help...s/onrender.htm
Please let me know if you have any questions.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Stanfillirenfro, Today, 07:23 AM
|
1 response
3 views
0 likes
|
Last Post Today, 07:37 AM | ||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
2 responses
20 views
0 likes
|
Last Post Today, 07:24 AM | ||
Started by olisav57, Yesterday, 07:39 PM
|
1 response
9 views
0 likes
|
Last Post Today, 07:23 AM | ||
Started by cocoescala, 10-12-2018, 11:02 PM
|
7 responses
944 views
0 likes
|
Last Post
by Jquiroz1975
Today, 07:21 AM
|
||
Started by oviejo, Today, 12:28 AM
|
1 response
12 views
0 likes
|
Last Post Today, 07:20 AM |
Comment