NexusFi: Find Your Edge


Home Menu

 





Trouble Programming Simple Indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one buddy858 with 12 posts (3 thanks)
    2. looks_two Fat Tails with 2 posts (5 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 alextrd with 1 posts (0 thanks)
    1. trending_up 5,284 views
    2. thumb_up 9 thanks given
    3. group 5 followers
    1. forum 16 posts
    2. attach_file 10 attachments




 
Search this Thread

Trouble Programming Simple Indicator

  #11 (permalink)
 
buddy858's Avatar
 buddy858 
Mandeville, LA
 
Experience: Intermediate
Platform: Ninja Trader, Tradestation
Trading: CL, GC, ES
Posts: 101 since Dec 2011
Thanks Given: 496
Thanks Received: 154


Fat Tails View Post
int or double:

timer.TotalSeconds returns a double value. There is no need to convert it to int, because you will use it as divisor for Volume[0], which itself contains a double value.

first bar of session:

Check for Bars.FirstBarOfSession with every bar. In case that you have a first bar of the session, you do not calculate timer = Time[0] - Time[1], but timer = Time[0] - sessionBegin. You can find out the sessionBegin via Bars.Session.GetNextBeginEnd(Bars, 0, out sessionBegin, out sessionEnd), where sessionBegin and sessionEnd are DateTime objects.

Thanks! I'm not really sure what to do with this, but hopefully I'll be able to figure it out, soon. See attached to understand why I wanted so badly to write this indicator. Just what I expected...





Daniel

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #12 (permalink)
 
alextrd's Avatar
 alextrd 
barcelona
 
Experience: None
Platform: ninjatrader
Trading: es
Posts: 55 since May 2011
Thanks Given: 40
Thanks Received: 17

hi,

this indi looks so good, do you know where I can find it?

Regards,

The bottoms of my shoes
are clean
from walking in the rain.
Reply With Quote
  #13 (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



buddy858 View Post
Thanks! I'm not really sure what to do with this, but hopefully I'll be able to figure it out, soon. See attached to understand why I wanted so badly to write this indicator. Just what I expected...

..

Daniel

also check out pace of tape (import to NT7 ok) Pace of [AUTOLINK]Tape[/AUTOLINK] Indicator » Trade With The Flow
avticksize
avtickspeed

Reply With Quote
Thanked by:
  #14 (permalink)
 
buddy858's Avatar
 buddy858 
Mandeville, LA
 
Experience: Intermediate
Platform: Ninja Trader, Tradestation
Trading: CL, GC, ES
Posts: 101 since Dec 2011
Thanks Given: 496
Thanks Received: 154


cory View Post
also check out pace of tape (import to NT7 ok) Pace of [AUTOLINK]Tape[/AUTOLINK] Indicator » Trade With The Flow
avticksize
avtickspeed

Thanks Cory, I really appreciate it. Interesting stuff...

Started this thread Reply With Quote
  #15 (permalink)
 
buddy858's Avatar
 buddy858 
Mandeville, LA
 
Experience: Intermediate
Platform: Ninja Trader, Tradestation
Trading: CL, GC, ES
Posts: 101 since Dec 2011
Thanks Given: 496
Thanks Received: 154


Fat Tails View Post
int or double:

timer.TotalSeconds returns a double value. There is no need to convert it to int, because you will use it as divisor for Volume[0], which itself contains a double value.

first bar of session:

Check for Bars.FirstBarOfSession with every bar. In case that you have a first bar of the session, you do not calculate timer = Time[0] - Time[1], but timer = Time[0] - sessionBegin. You can find out the sessionBegin via Bars.Session.GetNextBeginEnd(Bars, 0, out sessionBegin, out sessionEnd), where sessionBegin and sessionEnd are DateTime objects.

Hi @Fat Tails

I've taken another look at this tonight, and I wasn't really sure what to do with "Bars.Session.GetNextBeginEnd(Bars, 0, out sessionBegin, out sessionEnd)", but I did add the "DateTime sessionBegin" and "timer =Time[0] - sessionBegin" and that did take care of the first bar of the session (although I'm not very clear as to why). I also added "Plot0.Set (Volume[0]);" for when totalseconds < 0, so that I wouldn't have any of the bar values = 0. I want to add some bands to this, but I'm not quite sure how to do that just yet...I did manage to create the bands by looking at @ThatManFromTexas ' EMABollingerbands and adding/removing some code (attached). I named it "VolumeBollinger". I should be able to add this to the VPS indicator so that I have bands overlayed it, correct? I have yet to learn how to do that one...I also added this indicator "PercentPreviousVolume" so I could do some simple comparisons within Bloodhound, but I'm not 100% about the code. I'm not 100% about any code! But at least I know a little bit more than I did yesterday... I'm trying to educate myself here, but most of what I'm finding assumes I already know more than I do. I should probably do a C# basics series before going any further...

Best,

Daniel

Attached Files
Elite Membership required to download: VolumePerSecond.cs
Elite Membership required to download: VolumeBollinger.cs
Elite Membership required to download: PercentPreviousVol.cs
Started this thread Reply With Quote
Thanked by:
  #16 (permalink)
 
buddy858's Avatar
 buddy858 
Mandeville, LA
 
Experience: Intermediate
Platform: Ninja Trader, Tradestation
Trading: CL, GC, ES
Posts: 101 since Dec 2011
Thanks Given: 496
Thanks Received: 154


alextrd View Post
hi,

this indi looks so good, do you know where I can find it?

Regards,

Hi @alextrd,

Sorry, I just saw your post. For some reason I didn't get a notification. You can either load the one above, or wait a little longer until it's a bit better. I was thinking it could possibly be a useful part in some exit logic, using the swings indicator to test if you're breaking a previous high/low to eliminate the breakout type signals.. @Fat Tails' BetterVolumeX indicator might be interesting too... Well, it is interesting...And so is the standard BetterVolume on 1 thru 10 min charts...

Daniel

Started this thread Reply With Quote
Thanked by:
  #17 (permalink)
 
buddy858's Avatar
 buddy858 
Mandeville, LA
 
Experience: Intermediate
Platform: Ninja Trader, Tradestation
Trading: CL, GC, ES
Posts: 101 since Dec 2011
Thanks Given: 496
Thanks Received: 154

Well, there might be something here worth pursuing...I thought maybe not previously, but now that I've had another look...It might just provide a decent piece to the exit puzzle...






Daniel

Started this thread Reply With Quote




Last Updated on September 18, 2013


© 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