V8 time based indicator on a non-time-based chart, e.g., Renko, volume, tick - NinjaTrader | futures io social day trading
futures io futures trading


V8 time based indicator on a non-time-based chart, e.g., Renko, volume, tick
Updated: Views / Replies:130 / 2
Created: by bulldog Attachments:0

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 100,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
 

V8 time based indicator on a non-time-based chart, e.g., Renko, volume, tick

  #1 (permalink)
Elite Member
Salt Lake City, UT
 
Trading Experience: Beginner
Platform: NT
Favorite Futures: 6E
 
Posts: 4 since Aug 2012
Thanks: 0 given, 0 received

V8 time based indicator on a non-time-based chart, e.g., Renko, volume, tick

Would someone kindly provide a bit of code that would plot the 1 minute SMA on a Renko, volume, tick or some other non-time based chart?

I don't understand how to connect the AddDataSeries, AddPlot and the Values array.

Here's what I have:

public class b8MovingAverage : Indicator
{
private double priorSum;
private double sum;

protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Plot moving average based on a minut period";
Name = "b8MovingAverage";
IsOverlay = true;
IsSuspendedWhileInactive = true;
Period = 200;

}
else if (State == State.Configure)
{
priorSum = 0;
sum = 0;

AddDataSeries(BarsPeriodType.Minute, Period);
AddPlot(Brushes.Red, "b8MovingAverage");
}
}

protected override void OnBarUpdate()
{
Value[0] = SMA(Closes[1][0], Period)[0];
}

#region Properties
[Range(1, int.MaxValue), NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "Period", GroupName = "NinjaScriptParameters", Order = 0)]
public int Period
{ get; set; }
#endregion
}
}

Reply With Quote
 
  #2 (permalink)
Elite Member
Ann Arbor, Michigan USA
 
Trading Experience: Advanced
Platform: TradeStation, Biocomp
Favorite Futures: TF
 
Posts: 20 since Aug 2010
Thanks: 61 given, 21 received

Bulldog,

I am not a Ninja programmer, but I think this topic is very interesting and might be very useful when plotted with any language/trading platform. So my view on this in plain English...I would first think of this as showing ANY price indicator in real time or recorded after any definable event in the x-axis scale your BARS are plotted in. That leads to plotting your indicator recorded in another x-axis scale once it is defined as set-in-stone in the bar plot x-axis scale array.

So I would plot at least both x-axis scales' real time value as they are shown in real time in your time interval-based input data array such as ticks, seconds, thus defined, and the value of the one minute SMA upon the BAR CLOSED event, where it could be placed in an array of O,H,L,C,new indicator, upon bar close, or in a separate array of indicators set and plotted upon bar close. That could be, say, high and low of indicator saved on most recent high and low of plotted Renko, range,volume, etc. bar.

If you are watching a chart in real time, it makes sense to be able to see what is happening on one x-axis scale when a significant event is shown on a different x-axis scale.

Thus, it could be possible to make your template code able to show anything you want as it happens in any x-axis "time passed or events finished, or new non-time-interval based event occurred, etc.

What you are showing with your "any x-axis scale event indicator" plotting is the most recent event you can define with the same dimensions shown as your bar plot array, and they become fixed in your "saved-bars-plotted" array when the basic "bars plotted" array close event is done, its value is set, and the new bar plot is opened in real time.

Reply With Quote
 
  #3 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Trading Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,539 since Jun 2009
Thanks: 3,717 given, 4,258 received


@bulldog: no coding needed, just add another dataseries in the chart and an SMA on this secondary dataserie.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:

Reply



futures io > > > > V8 time based indicator on a non-time-based chart, e.g., Renko, volume, tick

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Benefits of Trading the Micro E-Minis w/Stage 5 & CME Group

Apr 30
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help!! Is there a volume indicator for tick based chart? futurestrader7 NinjaTrader 1 January 18th, 2016 10:24 AM
Average Time for Non-time based bars idude Sierra Chart 5 December 2nd, 2015 10:10 AM
Plots fine on time charts but not on non-time based charts olobay EasyLanguage Programming 10 April 26th, 2015 04:38 AM
Converting time based charts to volume and tick based charts SeanKozak Commodities Futures Trading 1 April 1st, 2014 09:05 PM
Renko charts on non-tick data? Xyzzy Platforms and Indicators 4 June 1st, 2011 08:47 PM


Tags
code, coding, data, dataseries, how to, indicator, indicators, moving average, new indicator, ninja, ninjatrader, platform, real time, renko, sma, tick, trading, values, volume

All times are GMT -4. The time now is 05:18 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business, 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 2019-04-26 in 0.18 seconds with 20 queries on phoenix