NexusFi: Find Your Edge


Home Menu

 





VolumeProfile start/end session


Discussion in NinjaTrader

Updated
    1. trending_up 3,456 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

VolumeProfile start/end session

  #1 (permalink)
 kashter 
Moving
 
Experience: Intermediate
Platform: NT
Broker: Mirus/Zen Fire
Trading: ES
Posts: 82 since May 2010
Thanks Given: 90
Thanks Received: 44

Hi,
I have limited programming skills and tried in vain to alter the VolumeProfile (or even GomVolumeProfile) to initiate at start of RTH session and stop at the end of the session, eg for ES. I have played around with the ToTime function to achieve this, thinking surely it must be simple but it has alluded me. Anyone willing to help out will be much appreciated.

Cheers.

EDIT : Never mind - got it. It took me a week to figure it and only after my post did I realize what I had to do. Maybe by posting here I will be able to resolve some of my other queries!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
What broker to use for trading palladium futures
Commodities
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



kashter View Post
Hi,
I have limited programming skills and tried in vain to alter the VolumeProfile (or even GomVolumeProfile) to initiate at start of RTH session and stop at the end of the session, eg for ES. I have played around with the ToTime function to achieve this, thinking surely it must be simple but it has alluded me. Anyone willing to help out will be much appreciated.

Cheers.

EDIT : Never mind - got it. It took me a week to figure it and only after my post did I realize what I had to do. Maybe by posting here I will be able to resolve some of my other queries!

I assume that you use NinjaTrader 7. The only reliable method so far is Bars.FirstBarOfSession. This is a boolean, which has the value true, if the current bar is the first bar of the session, otherwise false. I think you can try to use it.

Do not use Bars.GetSessionBar() or Bars.GetSessionDate(), these methods are flawed, they sometimes work and sometimes don't.

Reply With Quote
Thanked by:
  #4 (permalink)
 kashter 
Moving
 
Experience: Intermediate
Platform: NT
Broker: Mirus/Zen Fire
Trading: ES
Posts: 82 since May 2010
Thanks Given: 90
Thanks Received: 44


Fat Tails View Post
I assume that you use NinjaTrader 7. The only reliable method so far is Bars.FirstBarOfSession. This is a boolean, which has the value true, if the current bar is the first bar of the session, otherwise false. I think you can try to use it.

Do not use Bars.GetSessionBar() or Bars.GetSessionDate(), these methods are flawed, they sometimes work and sometimes don't.


Hi FT,
thx for the tip - was initially playing with Bars.GetSessionBar() but I think I failed more due to broken logic. I then applied simple "if (ToTime(Time[0]) > ToTime(08,30,00) ..." and works like a charm. Though very interested in learning C# code, and will experiment with Bars.FirstBarOfSession.

While I am at it, would you know how to identify and extract the longest bar in the VolumeProfile histogram. I could work the max volume (maxVolume) but not sure how to apply this to identify as to what price this refers to. Any hints. Much appreciated.

Cheers

Started this thread Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


kashter View Post
Hi FT,
thx for the tip - was initially playing with Bars.GetSessionBar() but I think I failed more due to broken logic. I then applied simple "if (ToTime(Time[0]) > ToTime(08,30,00) ..." and works like a charm. Though very interested in learning C# code, and will experiment with Bars.FirstBarOfSession.

While I am at it, would you know how to identify and extract the longest bar in the VolumeProfile histogram. I could work the max volume (maxVolume) but not sure how to apply this to identify as to what price this refers to. Any hints. Much appreciated.

Cheers

Also have a look at the dValueArea indicator. It plots the point of control. You could modify it for your own needs.

Links and Downloads Manager - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Value Areas - dValueArea - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Reply With Quote
Thanked by:
  #6 (permalink)
 kashter 
Moving
 
Experience: Intermediate
Platform: NT
Broker: Mirus/Zen Fire
Trading: ES
Posts: 82 since May 2010
Thanks Given: 90
Thanks Received: 44

Hi,
Its Sunday ad I have a bit of time on my sleeves, so that to progress with my Ninjascript/c# and modify GomVolumeProfile to suit my needs. I have included the time session and now want to highlight the peak volume histogram with a different color. I have managed to work out the value and bar but I am stuck with a little c# issue - how do you dynamically repaint the peak volume bar considering the peak bar changes all the time? I have the code below and does almost everything but I have no idea how to un-highlight prior peak volume bars. Any help is appreciated.
I am enjoying this C# - interesting stuff.
 
Code
if (xposMax < xpos) //we have a new peak
{
//	RemoveDrawObject("VPOC");
//	DrawRectangle("Peak", ;
					
	xposMax = Math.Max(xposMax, xpos);
	graphics.FillRectangle(neutralBrush,    new Rectangle(bounds.X, yUpper, xposMax, height));
}
I tried to play with the DrawRectangle function as its "tag" attribute would have resolved this but wasn't successful.

Cheers.

Started this thread Reply With Quote




Last Updated on August 29, 2010


© 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