NexusFi: Find Your Edge


Home Menu

 





Requesting basic OHLC indicator.


Discussion in NinjaTrader

Updated
    1. trending_up 8,550 views
    2. thumb_up 16 thanks given
    3. group 2 followers
    1. forum 30 posts
    2. attach_file 16 attachments




 
Search this Thread

Requesting basic OHLC indicator.

  #21 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


LaissezFaire View Post
Thanks a lot, cory!

However, I'm getting similar issues to last time when only using a *.cs file to add the indicator... Seems like I need a zip if that's not too much trouble.

try this

Attached Files
Elite Membership required to download: OHLC.zip
Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
43 thanks
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #22 (permalink)
LaissezFaire
Oslo + Norway
 
Posts: 224 since May 2016
Thanks Given: 224
Thanks Received: 104


cory View Post
try this

Hi, Cory,

Really appreciate your efforts, but I'm still not getting it to work.

I tried uninstalling/reinstalling NT8, but no luck.

I've tried deleting the scripts (manually) and re-importing, but no luck.

Any ideas...?

I will try it on another computer now.

EDIT: I just tried it on another computer, but no luck.

The indicator does show up on my list of indicators and I'm able to add it. There just ain't no lines on the chart.

Reply With Quote
  #23 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090



LaissezFaire View Post
Hi, Cory,

Really appreciate your efforts, but I'm still not getting it to work.

I tried uninstalling/reinstalling NT8, but no luck.

I've tried deleting the scripts (manually) and re-importing, but no luck.

Any ideas...?

I will try it on another computer now.

EDIT: I just tried it on another computer, but no luck.

The indicator does show up on my list of indicators and I'm able to add it. There just ain't no lines on the chart.

try this version, Note: to change color modify color in these lines;
....
if (barLo < barHi)
hlColor = Brushes.Blue;

if (barLo > barHi)
hlColor = Brushes.Red;
...

Attached Files
Elite Membership required to download: NT8_OHLC.zip
Reply With Quote
Thanked by:
  #24 (permalink)
LaissezFaire
Oslo + Norway
 
Posts: 224 since May 2016
Thanks Given: 224
Thanks Received: 104

Hi, Cory,

Thank you so much! Appears to work great!

Regarding this:


Quoting 
Cory: there is time zone indicator to color session start to end

How does this work? It seems to work only for session start? What I meant is that it would be nice if the horizontal lines on the current day could end at say 16:00 (US Equities RTH session end). Reads as 22:00 on my computer due to time zone differences...

But it's really of no consequence. I can simply plot a vertical line like I did manually to keep track of where the session ends.

Finally, is there a way for me to edit the Properties window if I would want that?

I did make changes to the color of Hi/Lo lines as instructed by you, but didn't see the possibility of making any changes to the Properties window. This one is more of a general question as I'd like to learn a bit more about programming indicators in Ninja.

Best regards and thanks again!


Reply With Quote
  #25 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


LaissezFaire View Post
Hi, Cory,

Thank you so much! Appears to work great!

Regarding this:
How does this work? It seems to work only for session start?

i meant there is other indicator to color start, end time time like this one
https://forum.ninjatrader.com/local_links.php?action=sendtofriend&catid=7&linkid=975



Quoting 
Finally, is there a way for me to edit the Properties window if I would want that?

most indicator have color change interface, you can even take a look at the indicator above to see how done.

Reply With Quote
Thanked by:
  #26 (permalink)
LaissezFaire
Oslo + Norway
 
Posts: 224 since May 2016
Thanks Given: 224
Thanks Received: 104

Aha. I understand, Cory! Thanks!

With regards to Properties in the indicator.

What I meant is that I now know how to make changes to the script if I'd want that.

Would there be a way for me to edit the text/formatting/parameters in the Properties window of an existing indicator? Or is that something one can do only when creating the indicator?

Thanks!

Reply With Quote
  #27 (permalink)
LaissezFaire
Oslo + Norway
 
Posts: 224 since May 2016
Thanks Given: 224
Thanks Received: 104

Hi, Cory,

Once again many thanks for the great indicator you made for me!

I'm curious.

Is it possible to edit the text in the Properties window for the indicator settings? I suffer from mild OCD and would like to change some of the text data. Big case letters, etc.



Also, I noticed that on the close for the last day it seems like it plots the close at 21:59. Not a big issue on my end as it seems to be correct for all other historical days.

Thanks in advance.

Best regards.

Reply With Quote
  #28 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


LaissezFaire View Post
Hi, Cory,

Once again many thanks for the great indicator you made for me!

I'm curious.

Is it possible to edit the text in the Properties window for the indicator settings? I suffer from mild OCD and would like to change some of the text data. Big case letters, etc.
...
Thanks in advance.

Best regards.

use ninja editor open the indicator look for this line
// Draws a lime green ray from 10 bars back through the current bar,
then cut and paste below code over 4 tag1,tag2,tag3,tag4 lines then compile it
 
Code
// Draws a lime green ray from 10 bars back through the current bar
//Draw.Ray(this, "tag1", 1, currentOpen, 0, currentOpen, Plots[0].Brush);
Draw.Ray(this, "tag1", false, 1, currentOpen, 0,currentOpen, Plots[0].Brush, DashStyleHelper.Solid, 5);
//Draw.Ray(this, "tag2", 1, currentHigh, 0, currentHigh, Plots[1].Brush);
Draw.Ray(this, "tag2", false, 1, currentHigh, 0,currentHigh, Plots[1].Brush, DashStyleHelper.Solid, 5);		
//Draw.Ray(this, "tag3", 1, currentLow, 0, currentLow, Plots[2].Brush);
Draw.Ray(this, "tag3", false, 1, currentLow, 0,currentLow, Plots[2].Brush, DashStyleHelper.Solid, 5);				
//Draw.Ray(this, "tag4", 1, currentClose, 0, currentClose, Plots[3].Brush);
Draw.Ray(this, "tag4", false, 1, currentClose, 0,currentClose, Plots[3].Brush, DashStyleHelper.Solid, 5);
Note: after cut & paste, it should look like this

Attached Thumbnails
Click image for larger version

Name:	2018-04-21_1025.png
Views:	227
Size:	85.6 KB
ID:	248886  
Reply With Quote
Thanked by:
  #29 (permalink)
LaissezFaire
Oslo + Norway
 
Posts: 224 since May 2016
Thanks Given: 224
Thanks Received: 104

Hi, cory,

Thank you!

Was this additonal code supposed to take care of the close on last day not quite correct?

This is what it looks like after updating the code.



Best regards,

Johannes

Reply With Quote
  #30 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090



LaissezFaire View Post
Hi, cory,

Thank you!

....take care of the close on last day not quite correct?

....

Johannes

no, no clue what that mean?

Reply With Quote
Thanked by:




Last Updated on April 22, 2018


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts