Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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;
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.