Plotting change. Easy? - NinjaTrader Programming | futures io social day trading
futures io futures trading

Plotting change. Easy?
Updated: Views / Replies:495 / 1
Created: by traderjh 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

Thread Tools Search this Thread

Plotting change. Easy?

  #1 (permalink)
Elite Member
South Jordan UT
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: Forex
Posts: 15 since Jan 2013
Thanks: 6 given, 1 received

Plotting change. Easy?

Hello all,

I got PMA indicator from public domain and I like to try using this for strategy. I am trying to modify PMA indicator into a strategy. But it doesn't work for me. I know I have a lot to learn. It is a simple program and I am not familiar with the differences between indicator and strategy plottings.

Would it be possible if you could just modify those lines below? I hope it is not too big of a task and is really simple. Is it doable?

Let me know.

Many thanks,

#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;

// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
    /// <summary>
    /// Predictive Moving Average (ehlers)
    /// </summary>
    [Description("Predictive Moving Average (ehlers)")]
    public class PMA : Indicator
        #region Variables
    // declare the variables here
        double WMA2;
        double Trigger;
    // create the dataseries here
	private DataSeries WMA1;
	private DataSeries Predict;

        /// <summary>
        /// This method is used to configure the indicator and is called once before any bar data is loaded.
        /// </summary>
        protected override void Initialize()
            // add the plots here
            Add(new Plot(new Pen(Color.Blue, 3), PlotStyle.Line, "Predict_Plot"));
            Add(new Plot(new Pen(Color.Red, 3), PlotStyle.Line, "Trigger_Plot"));
            CalculateOnBarClose    = true;
            Overlay                = false;
            PriceTypeSupported    = true;
	// initialize dataseries here
	   WMA1 = new DataSeries(this);
	   Predict = new DataSeries(this);

        /// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        protected override void OnBarUpdate()
	// if there isn't enough data just set the variables to 0
            if (CurrentBar < 7) 
                WMA2 = 0;
                Trigger = 0;
	// else set the variables to the real values
		WMA1.Set((7*Median[0] + 6*Median[1] + 5*Median[2] + 4*Median[3] + 3*Median[4] + 2*Median[5] + Median[6])/28);
		WMA2 = (7*WMA1[0] + 6*WMA1[1] + 5*WMA1[2] + 4*WMA1[3] + 3*WMA1[4] + 2*WMA1[5] + WMA1[6])/28;
		Predict.Set(2*WMA1[0] - WMA2);
		Trigger = (4*Predict[0] + 3*Predict[1] + 2*Predict[2] + Predict[3])/10;
	    // set the plots

        #region Properties;
		// create the dataseries for the plots
        [Browsable(false)]   // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
        [XmlIgnore()]       // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
        public DataSeries Predict_Plot
        get { return Values[0]; }
        [Browsable(false)]   // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
        [XmlIgnore()]       // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
        public DataSeries Trigger_Plot
        get { return Values[1]; }


Reply With Quote
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


futures io > > > > > Plotting change. Easy?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

July Journal Challenge - $500 in Amazon Gift Cards!


AXESS Trader: Powerful Cloud Based Trading Platform w/GFF Brokers

Jul 17

TBA: FuturesTrader71 w/Morad Askar

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Apple Plotting Against Your Old iPhone? Quick Summary News and Current Events 0 November 1st, 2013 04:30 PM
Is there an indicator that shows price change averaged with volume change intrabar? Itchymoku NinjaTrader 8 July 31st, 2012 07:40 PM
Plotting options Bespoke Options on Futures 8 December 11th, 2011 05:59 PM
easy language ..not easy... Serger EasyLanguage Programming 4 April 26th, 2011 03:42 PM
LA Times: "Foreign currency trading is easy — an easy way to lose money" shodson News and Current Events 7 April 4th, 2011 09:20 AM

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

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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 2018-07-17 in 0.08 seconds with 14 queries on phoenix