Session Lines indicator help please - NinjaTrader Programming | futures io social day trading
futures io futures trading


Session Lines indicator help please
Updated: Views / Replies:695 / 6
Created: by gever17 Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Session Lines indicator help please

  #1 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: NQ, YM
 
Posts: 69 since Nov 2010
Thanks: 329 given, 54 received

Session Lines indicator help please

Hello
Thanks for looking!!!

I am trying to get this user defined Session Lines Indicator of mine to plot on minutes instead of only hours. Right now it will only work on the hour. ....ie 800 or 1400 hours.

I want to be able to do 730 and 1415.

Thought I had it figured out but it wont plot. Searched everywhere I could think of but cant seem to find the right code.

In this code I was working with and trying to modify time1....

Here is the code:
 
Code
[Description("Plots vertical lines as per UI")]
             public class SessionLinesGE : Indicator
        {
        #region Variables
            private int time1 = 73000; //Changed this from 8 to 73000
            private int color1 = 1;
            private int time2 = 14;
            private int color2 = 1;

	    private string name;
	    private int i=0,j=0;
        #endregion

        protected override void Initialize()
        {
            DrawOnPricePanel	= true;
            Overlay				= true;
        }

        protected override void OnBarUpdate()
        {
			if (CurrentBar<2) return;
			
           	if (time1!=0)
			{
				if (Time[0].Minute == time1 && Time[1].Minute < time1) //changed this from .Hour to .Minute
				{
					name = "Line1"+i;
					if (color1==1)
					{	
					DrawVerticalLine(name,0,Color.DimGray,DashStyle.Dot,2);
					}
					i++;		
				}
			}
			
			if (time2!=0)
			{
				if (Time[0].Hour == time2 && Time[1].Hour < time2)
				{
					name = "Line2"+j;
					if (color2==1)
					{	
					DrawVerticalLine(name,0,Color.DimGray,DashStyle.Dot,2);
					}
					j++;	
				}
			}
        }

        #region Properties
        [Browsable(false)]
        [XmlIgnore()]
        public DataSeries Plot0
        {
            get { return Values[0]; }
        }

		[Description("Hour of Line1 (0 = do not plot)")]
        [GridCategory("Parameters")]
        public int Time1
        {
            get { return time1; }
            set { time1 = Math.Min(Math.Max(10000, value),240000); }// Changed this from Math.Max(1, value) to Math.Min(Math.Max(10000, value),240000)
        }

        [Description("")]
        [GridCategory("Parameters")]
        public int Color1
        {
            get { return color1; }
            set { color1 = Math.Max(1, value); }
        }

        [Description("Hour of Line2 (0= do not plot)")]
        [GridCategory("Parameters")]
        public int Time2
        {
            get { return time2; }
            set { time2 = Math.Max(1, value); }
        }

        [Description("")]
        [GridCategory("Parameters")]
        public int Color2
        {
            get { return color2; }
            set { color2 = Math.Max(1, value); }
        }
        #endregion
    }
}
Any advice on this would be greatly appreciated!
Again, Thank you for looking!

gever17


Last edited by gever17; January 23rd, 2013 at 05:40 PM.
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,217 since Jun 2009
Thanks: 628 given, 6,314 received
Forum Reputation: Legendary



gever17 View Post
Hello
Thanks for looking!!!

I am trying to get this user defined Session Lines Indicator of mine to plot on minutes instead of only hours. Right now it will only work on the hour. ....ie 800 or 1400 hours.

I want to be able to do 730 and 1415.

Thought I had it figured out but it wont plot. Searched everywhere I could think of but cant seem to find the right code.

In this code I was working with and trying to modify time1....

use this search , key word 'session'
https://futures.io/search/attachments/

Reply With Quote
The following 2 users say Thank You to cory for this post:
 
  #4 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: NQ, YM
 
Posts: 69 since Nov 2010
Thanks: 329 given, 54 received

Thank you Cory!!

Hi @cory,

Thank you very much for your time!!!

I tried searches but had no idea there was a search like this!

Not sure where to find this search method. I have simply bookmarked the link for the search!

Found exactly what I was looking for!

Thanks again!!! Cant express my gratitude enough!

gever17


Last edited by gever17; January 23rd, 2013 at 07:29 PM.
Reply With Quote
 
  #5 (permalink)
Market Wizard
Columbus, OH
 
Futures Experience: None
Platform: NT 8, TOS
Favorite Futures: ES
 
Silvester17's Avatar
 
Posts: 3,332 since Aug 2009
Thanks: 4,579 given, 10,313 received


gever17 View Post
Hi Cory,

Thank you very much for your time!!!

I tried searches but had no idea there was a search like this!

Not sure where to find this search method. I have simply bookmarked the link for the search!

Found exactly what I was looking for!

Thanks again!!! Cant express my gratitude enough!

gever17

@gever17,

top right corner, just click (like shown in pic) and a drop down menu appears. and then click on "search for attachments instead"

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 3 users say Thank You to Silvester17 for this post:
 
  #6 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: NQ, YM
 
Posts: 69 since Nov 2010
Thanks: 329 given, 54 received

Sweet!! Got it!!!!

Thank you @Silvester17!!!

Got it now!! Click in the empty search box!!!

I was always clicking on the "Search" button.

Funny part is I have probably seen that dropdown a thousand times. But just typed in my search and never paid attention! Details!!! Gotta see um!!!

Anyway thanks again for you time!!

gever17


Last edited by gever17; January 23rd, 2013 at 07:28 PM. Reason: Notice I thanked wrong person in this post
Reply With Quote
The following user says Thank You to gever17 for this post:
 
  #7 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,217 since Jun 2009
Thanks: 628 given, 6,314 received
Forum Reputation: Legendary

I think a button says 'more search options' is more helpful than clicking on an empty box for more search options but it is what it is.

Reply With Quote

Reply



futures io > > > > > Session Lines indicator help please

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
horizontal lines for indicator like the priceline fossil NinjaTrader 8 October 20th, 2016 03:33 PM
[MC] Indicator showing custom S/R lines Nicolas11 The Elite Circle 9 August 24th, 2014 11:59 AM
BT OPENING RANGE INDICATOR - without vertical lines at session changes Todd NinjaTrader Programming 108 December 7th, 2013 11:02 PM
Need info regarding Dynamic SR Lines Indicator, please podowitz NinjaTrader Programming 1 September 17th, 2012 01:07 PM
Murray Lines NinjaTrader indicator TrendTraderBH NinjaTrader 6 March 18th, 2012 06:39 PM


All times are GMT -4. The time now is 09:26 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.11 seconds with 20 queries on phoenix via your IP 54.82.56.95