Trouble Programming Simple Indicator - NinjaTrader Programming | futures io social day trading
futures io futures trading


Trouble Programming Simple Indicator
Updated: Views / Replies:2,090 / 16
Created: by buddy858 Attachments:10

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
 10  
 
Thread Tools Search this Thread
 

Trouble Programming Simple Indicator

  #11 (permalink)
Elite Member
Mandeville, LA
 
Futures Experience: Intermediate
Platform: Ninja Trader, Tradestation
Favorite Futures: CL, GC, ES
 
buddy858's Avatar
 
Posts: 101 since Dec 2011
Thanks: 495 given, 146 received


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...

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


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


Daniel

Reply With Quote
The following user says Thank You to buddy858 for this post:
 
  #12 (permalink)
Elite Member
barcelona
 
Futures Experience: None
Platform: ninjatrader
Favorite Futures: es
 
alextrd's Avatar
 
Posts: 53 since May 2011
Thanks: 39 given, 16 received

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)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,218 since Jun 2009
Thanks: 628 given, 6,315 received
Forum Reputation: Legendary



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 Tape Indicator » Trade With The Flow
avticksize https://futures.io/trading-journals/2848-cunparis-journal-thoughts-more-66.html#post51638
avtickspeed https://futures.io/elite-circle/1230-market-cycles-fun-profit-19.html#post48938

Reply With Quote
The following user says Thank You to cory for this post:
 
  #14 (permalink)
Elite Member
Mandeville, LA
 
Futures Experience: Intermediate
Platform: Ninja Trader, Tradestation
Favorite Futures: CL, GC, ES
 
buddy858's Avatar
 
Posts: 101 since Dec 2011
Thanks: 495 given, 146 received



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

Reply With Quote
 
  #15 (permalink)
Elite Member
Mandeville, LA
 
Futures Experience: Intermediate
Platform: Ninja Trader, Tradestation
Favorite Futures: CL, GC, ES
 
buddy858's Avatar
 
Posts: 101 since Dec 2011
Thanks: 495 given, 146 received

VolPerSecond (a bit better)


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
Register to download File Type: cs VolumePerSecond.cs (5.8 KB, 34 views)
Register to download File Type: cs VolumeBollinger.cs (10.3 KB, 20 views)
Register to download File Type: cs PercentPreviousVol.cs (14.0 KB, 21 views)

Last edited by buddy858; September 18th, 2013 at 01:29 AM.
Reply With Quote
The following user says Thank You to buddy858 for this post:
 
  #16 (permalink)
Elite Member
Mandeville, LA
 
Futures Experience: Intermediate
Platform: Ninja Trader, Tradestation
Favorite Futures: CL, GC, ES
 
buddy858's Avatar
 
Posts: 101 since Dec 2011
Thanks: 495 given, 146 received


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...https://futures.io/traders-hideout/634-how-use-volume-your-trading-53.html#post113668 Well, it is interesting...And so is the standard BetterVolume on 1 thru 10 min charts...https://futures.io/ninjatrader/9042-better-volume-indicator-sound-alerts.html

Daniel


Last edited by buddy858; September 18th, 2013 at 01:42 AM.
Reply With Quote
The following user says Thank You to buddy858 for this post:
 
  #17 (permalink)
Elite Member
Mandeville, LA
 
Futures Experience: Intermediate
Platform: Ninja Trader, Tradestation
Favorite Futures: CL, GC, ES
 
buddy858's Avatar
 
Posts: 101 since Dec 2011
Thanks: 495 given, 146 received

2 Examples

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...

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


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



Daniel

Reply With Quote

Reply



futures io > > > > > Trouble Programming Simple Indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming simple strategy Hermo Elite Automated Trading 1 October 24th, 2012 08:21 PM
NT7 Elite Indicator Trouble. taylor NinjaTrader 10 August 11th, 2011 10:07 PM
Trouble with multiple plots on an indicator eddd NinjaTrader Programming 3 May 31st, 2011 04:45 PM
Indicator programming Mondrakete NinjaTrader Programming 3 April 3rd, 2011 02:02 PM
A Simple Programming Request thenckel NinjaTrader Programming 2 December 2nd, 2010 09:34 AM


All times are GMT -4. The time now is 10:30 PM.

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.226.113.250