plot color dot on High/low - NinjaTrader Programming | futures io social day trading
futures io futures trading


plot color dot on High/low
Updated: Views / Replies:2,597 / 3
Created: by edi025 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 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
 
Thread Tools Search this Thread
 

plot color dot on High/low

  #1 (permalink)
Elite Member
stuttgart
 
Futures Experience: Advanced
Platform: NinjaTrader, TradeStation
 
Posts: 20 since Nov 2009
Thanks: 30 given, 23 received

plot color dot on High/low

Hi,

I need your help in programming an indicator.
And I wish that I display by a color dot the High and Low Close vin. I have it already but it only shows me one by one color. But I want two colors.
So it should look something ..

http://img705.imageshack.us/img705/7481/bild4zh.png

this is the code of dot plot .
Thank you

 
Code
                            
#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;
#endregion

// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
    
/// <summary>
    /// Plots Dots On OHLC
    /// </summary>
    
[Description("Plots Dots On OHLC")]
    public class 
PlotDot Indicator
    
{
        
#region Variables
        // Wizard generated variables
            
private string tag = @"Dots"// Default setting for Tag
            
private bool autoscale true// Default setting for Autoscale
            
private int barsago 0// Default setting for Barsago
            
private double y 0// Default setting for Y
        // User defined variables (add any user defined variables below)
        #endregion

        /// <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(new Plot(Color.FromKnownColor(KnownColor.White), PlotStyle.Dot"Plot0"));
            
CalculateOnBarClose    true;
            
Overlay                true;
            
PriceTypeSupported    false;
        }

        
/// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        
protected override void OnBarUpdate()
        {
            
// Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
            
Plot0.Set(Close[0]);
        }

        
#region Properties
        
[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 Plot0
        
{
            
get { return Values[0]; }
        }

        [
Description("Marked Dots")]
        [
Category("Parameters")]
        public 
string Tag
        
{
            
get { return tag; }
            
set tag value; }
        }

        [
Description("")]
        [
Category("Parameters")]
        public 
bool Autoscale
        
{
            
get { return autoscale; }
            
set autoscale value; }
        }

        [
Description("")]
        [
Category("Parameters")]
        public 
int Barsago
        
{
            
get { return barsago; }
            
set barsago Math.Max(0value); }
        }

        [
Description("")]
        [
Category("Parameters")]
        public 
double Y
        
{
            
get { return y; }
            
set Math.Max(0value); }
        }
        
#endregion
    
}
}

#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
    public 
partial class Indicator IndicatorBase
    
{
        private 
PlotDot[] cachePlotDot null;

        private static 
PlotDot checkPlotDot = new PlotDot();

        
/// <summary>
        /// Plots Dots On OHLC
        /// </summary>
        /// <returns></returns>
        
public PlotDot PlotDot(bool autoscaleint barsagostring tagdouble y)
        {
            return 
PlotDot(Inputautoscalebarsagotagy);
        }

        
/// <summary>
        /// Plots Dots On OHLC
        /// </summary>
        /// <returns></returns>
        
public PlotDot PlotDot(Data.IDataSeries inputbool autoscaleint barsagostring tagdouble y)
        {
            
checkPlotDot.Autoscale autoscale;
            
autoscale checkPlotDot.Autoscale;
            
checkPlotDot.Barsago barsago;
            
barsago checkPlotDot.Barsago;
            
checkPlotDot.Tag tag;
            
tag checkPlotDot.Tag;
            
checkPlotDot.y;
            
checkPlotDot.Y;

            if (
cachePlotDot != null)
                for (
int idx 0idx cachePlotDot.Lengthidx++)
                    if (
cachePlotDot[idx].Autoscale == autoscale && cachePlotDot[idx].Barsago == barsago && cachePlotDot[idx].Tag == tag && Math.Abs(cachePlotDot[idx].y) <= double.Epsilon && cachePlotDot[idx].EqualsInput(input))
                        return 
cachePlotDot[idx];

            
PlotDot indicator = new PlotDot();
            
indicator.BarsRequired BarsRequired;
            
indicator.CalculateOnBarClose CalculateOnBarClose;
            
indicator.Input input;
            
indicator.Autoscale autoscale;
            
indicator.Barsago barsago;
            
indicator.Tag tag;
            
indicator.y;
            
indicator.SetUp();

            
PlotDot[] tmp = new PlotDot[cachePlotDot == null cachePlotDot.Length 1];
            if (
cachePlotDot != null)
                
cachePlotDot.CopyTo(tmp0);
            
tmp[tmp.Length 1] = indicator;
            
cachePlotDot tmp;
            
Indicators.Add(indicator);

            return 
indicator;
        }

    }
}

// This namespace holds all market analyzer column definitions and is required. Do not change it.
namespace NinjaTrader.MarketAnalyzer
{
    public 
partial class Column ColumnBase
    
{
        
/// <summary>
        /// Plots Dots On OHLC
        /// </summary>
        /// <returns></returns>
        
[Gui.Design.WizardCondition("Indicator")]
        public 
Indicator.PlotDot PlotDot(bool autoscaleint barsagostring tagdouble y)
        {
            return 
_indicator.PlotDot(Inputautoscalebarsagotagy);
        }

        
/// <summary>
        /// Plots Dots On OHLC
        /// </summary>
        /// <returns></returns>
        
public Indicator.PlotDot PlotDot(Data.IDataSeries inputbool autoscaleint barsagostring tagdouble y)
        {
            return 
_indicator.PlotDot(inputautoscalebarsagotagy);
        }

    }
}

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    public 
partial class Strategy StrategyBase
    
{
        
/// <summary>
        /// Plots Dots On OHLC
        /// </summary>
        /// <returns></returns>
        
[Gui.Design.WizardCondition("Indicator")]
        public 
Indicator.PlotDot PlotDot(bool autoscaleint barsagostring tagdouble y)
        {
            return 
_indicator.PlotDot(Inputautoscalebarsagotagy);
        }

        
/// <summary>
        /// Plots Dots On OHLC
        /// </summary>
        /// <returns></returns>
        
public Indicator.PlotDot PlotDot(Data.IDataSeries inputbool autoscaleint barsagostring tagdouble y)
        {
            if (
InInitialize && input == null)
                throw new 
ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");

            return 
_indicator.PlotDot(inputautoscalebarsagotagy);
        }

    }
}
#endregion 


Last edited by sam028; June 27th, 2010 at 07:18 PM. Reason: add coding tag
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.

 
  #3 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,215 since Jun 2009
Thanks: 628 given, 6,311 received


repeat plot0 and change its name to plot1

...
then you can plot the high, add third plot to plot the open etc...

Plot1.Set(High[0]);

Reply With Quote
The following user says Thank You to cory for this post:
 
  #4 (permalink)
Elite Member
stuttgart
 
Futures Experience: Advanced
Platform: NinjaTrader, TradeStation
 
Posts: 20 since Nov 2009
Thanks: 30 given, 23 received

I'll try it.

Thank you cory

Reply With Quote

Reply



futures io > > > > > plot color dot on High/low

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Globex High Low spinnybobo The Elite Circle 6 September 11th, 2011 05:45 PM
Plot High/Low points proton242 EasyLanguage Programming 11 July 24th, 2011 05:07 AM
Plot a dot (multicharts) Ozons EasyLanguage Programming 3 February 8th, 2011 01:08 PM
Tick diff between High-Low tickvix NinjaTrader 4 June 29th, 2010 02:14 PM
3 bar high/low entry maintain active order until 3 bar high/low in opposite direction mrticks NinjaTrader Programming 8 November 13th, 2009 08:44 PM


All times are GMT -4. The time now is 07:32 AM.

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-11 in 0.08 seconds with 19 queries on phoenix via your IP 54.226.132.197