PriceActionSwing discussion (Page 67) - NinjaTrader | futures.io
futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader


PriceActionSwing discussion
Started:November 23rd, 2009 (11:23 AM) by dorschden Views / Replies:392,600 / 1,346
Last Reply:December 7th, 2016 (10:04 AM) Attachments:423

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike
     

Reply
 423  
 
Thread Tools Search this Thread

PriceActionSwing discussion

Old January 1st, 2013, 10:35 AM   #661 (permalink)
Market Wizard
Columbus, OH
 
Futures Experience: None
Platform: NT-9G, TOS
Favorite Futures: ES
 
Silvester17's Avatar
 
Posts: 3,229 since Aug 2009
Thanks: 4,429 given, 9,899 received

@lolu,

yes. all I did was posting a version with the changes below.



dorschden View Post

GomCD:

To use cumulative delta for the swings or divergence you have to uncomment all GomCD regions in the source code. Press "ctrl + F" or the "Find/Replace" button and search for "region GomCD" and uncomment all the regions and compile it. Of course you have to install the Gom package before.


Reply With Quote
     
The following 5 users say Thank You to Silvester17 for this post:
     

Old January 7th, 2013, 12:45 PM   #662 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: ninja,TS,Meta,Tradeguider
Favorite Futures: FX,Metals
 
Posts: 38 since Sep 2011
Thanks: 9 given, 6 received

Hi again

trying to pick up and color background with this code but i cant find a good example to code from for dataseries, from the databox i can see VHigh or VLow is set and N/A appears in the one not set so i thought I might have to use a dataseries and test with contains value . However in debugging VHigh allways seems to contain a value. If anyone can help it would be appreciated

 
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;
using PriceActionSwingOscillator.Utility;
#endregion

// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
    /// <summary>
    /// Enter the description of your new custom indicator here
    /// </summary>
    [Description("Enter the description of your new custom indicator here")]
    public class aaPASOSCbackcolor : Indicator
    {
        #region Variables
        // Wizard generated variables
        // User defined variables (add any user defined variables below)
			private SwingTypes swingType = SwingTypes.Gann;
			private DataSeries myDataSeries; // Define a DataSeries variable
			private double vhighVal;
		#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()
        {
            Overlay				= true;
			myDataSeries = new DataSeries(this); // "this" refers to the indicator
        }

        /// <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.
			if (CurrentBar < 20) return;
				
			vhighVal=PriceActionSwingOscillator(15, 5, swingType).VHigh[0];
			Print(CurrentBar + "  " + Time[0].ToString()+ " VHigh: " + " " + vhighVal); 
			myDataSeries.Set(vhighVal);
			
			if (myDataSeries.ContainsValue(0))
            {
	            BackColor = Color.FromArgb(50,201,4,14);
            }
            else
            {
                BackColor = Color.FromArgb(50,26,166,10);
            }
        }

        #region Properties

        #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 aaPASOSCbackcolor[] cacheaaPASOSCbackcolor = null;

        private static aaPASOSCbackcolor checkaaPASOSCbackcolor = new aaPASOSCbackcolor();

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public aaPASOSCbackcolor aaPASOSCbackcolor()
        {
            return aaPASOSCbackcolor(Input);
        }

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public aaPASOSCbackcolor aaPASOSCbackcolor(Data.IDataSeries input)
        {
            if (cacheaaPASOSCbackcolor != null)
                for (int idx = 0; idx < cacheaaPASOSCbackcolor.Length; idx++)
                    if (cacheaaPASOSCbackcolor[idx].EqualsInput(input))
                        return cacheaaPASOSCbackcolor[idx];

            lock (checkaaPASOSCbackcolor)
            {
                if (cacheaaPASOSCbackcolor != null)
                    for (int idx = 0; idx < cacheaaPASOSCbackcolor.Length; idx++)
                        if (cacheaaPASOSCbackcolor[idx].EqualsInput(input))
                            return cacheaaPASOSCbackcolor[idx];

                aaPASOSCbackcolor indicator = new aaPASOSCbackcolor();
                indicator.BarsRequired = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                Indicators.Add(indicator);
                indicator.SetUp();

                aaPASOSCbackcolor[] tmp = new aaPASOSCbackcolor[cacheaaPASOSCbackcolor == null ? 1 : cacheaaPASOSCbackcolor.Length + 1];
                if (cacheaaPASOSCbackcolor != null)
                    cacheaaPASOSCbackcolor.CopyTo(tmp, 0);
                tmp[tmp.Length - 1] = indicator;
                cacheaaPASOSCbackcolor = tmp;
                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>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        [Gui.Design.WizardCondition("Indicator")]
        public Indicator.aaPASOSCbackcolor aaPASOSCbackcolor()
        {
            return _indicator.aaPASOSCbackcolor(Input);
        }

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public Indicator.aaPASOSCbackcolor aaPASOSCbackcolor(Data.IDataSeries input)
        {
            return _indicator.aaPASOSCbackcolor(input);
        }
    }
}

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    public partial class Strategy : StrategyBase
    {
        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        [Gui.Design.WizardCondition("Indicator")]
        public Indicator.aaPASOSCbackcolor aaPASOSCbackcolor()
        {
            return _indicator.aaPASOSCbackcolor(Input);
        }

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public Indicator.aaPASOSCbackcolor aaPASOSCbackcolor(Data.IDataSeries input)
        {
            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.aaPASOSCbackcolor(input);
        }
    }
}
#endregion

Reply With Quote
     

Old January 15th, 2013, 09:41 AM   #663 (permalink)
Elite Member
laconia +nh/us
 
Futures Experience: Intermediate
Platform: Jigsaw on Ninja Trader
Favorite Futures: ZN
 
Posts: 1 since Jun 2012
Thanks: 1 given, 0 received


Does anyone know of an add-on to this that would take the ratio of volume to ticks for each swing and place it where the volume and ticks are plotted, or something of that nature?

Reply With Quote
     

Old January 22nd, 2013, 03:55 PM   #664 (permalink)
Elite Member
Netherlands
 
Futures Experience: Advanced
Platform: MC+ ninja+ irt
 
Posts: 25 since Mar 2010
Thanks: 11 given, 14 received


Silvester17 View Post
many are still struggling to use gom cd as a divergence indicator.

if it's ok, I post a version of the price action swing pro indicator that can be used with gom cd. (all the necessary changes are already made) if not, let me know and I'll delete the file.

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

thanks for this.

i can select gomcd as divergence indicator but dont see the gomcd settings window

see 2013-01-22_2053 - Relact's library

the divergences arent plotted....

any ideas?

Reply With Quote
     

Old January 22nd, 2013, 05:03 PM   #665 (permalink)
Market Wizard
Columbus, OH
 
Futures Experience: None
Platform: NT-9G, TOS
Favorite Futures: ES
 
Silvester17's Avatar
 
Posts: 3,229 since Aug 2009
Thanks: 4,429 given, 9,899 received

Futures Edge on FIO

O66NL View Post
thanks for this.

i can select gomcd as divergence indicator but dont see the gomcd settings window

see 2013-01-22_2053 - Relact's library

the divergences arent plotted....

any ideas?

@O66NL,

as far as I know you can't change the settings unless you change them in the code:

 
Code
 private ShowGomCD showGomCD = ShowGomCD.SwingCD_And_AbsoluteCD;
        private int textOffsetGomCd = 60;
        private GomCD gomCdAll;
        private GomFilterModeType gomCdVolumeFilterSizeMode = GomFilterModeType.None;
        private GomCDCalculationModeType gomCdCalcMode = GomCDCalculationModeType.BidAsk;
        private int gomCdVolumeFilterSize = 1;
        private int gomCdAllSwingLowValue = 0;
        private int gomCdAllSwingHighValue = 0;
        private int curHighGomCdAll = 0;
        private int curLowGomCdAll = 0;
        private int lastHighGomCdAll = 0;
        private int lastLowGomCdAll = 0;

also don't forget you need to record data in order to see the gom cd divergence.

Reply With Quote
     
The following user says Thank You to Silvester17 for this post:
     

Old January 22nd, 2013, 10:42 PM   #666 (permalink)
Elite Member
San Mateo
 
Futures Experience: Beginner
Platform: Ninja Trader
Favorite Futures: es/ eur/usd/oil/gold
 
Posts: 7 since Jun 2012
Thanks: 1 given, 0 received

Gom CD

My Indicator don't have the Gom CD specs? Please help. Thanks

Reply With Quote
     

Old January 27th, 2013, 01:50 PM   #667 (permalink)
Trading Apprentice
Toronto Ontario Canada
 
Futures Experience: Beginner
Platform: Ninja Trader
Favorite Futures: ES
 
Posts: 2 since Jan 2013
Thanks: 12 given, 0 received

Price action swing indi

Many thanks for this indi.

Reply With Quote
     

Old January 28th, 2013, 04:28 PM   #668 (permalink)
Elite Member
Chicago, IL/USA
 
Futures Experience: Intermediate
Platform: Ninja Trader
Broker/Data: AMP Trading - CQG/ThinkorSwim
Favorite Futures: Futures
 
gretzkyless's Avatar
 
Posts: 29 since Jan 2013
Thanks: 11 given, 12 received

Could someone please let me know if there is a different 'PriceActionSwing' or 'PriceActionSwingPro' indicator I should be using? Attached is a screen print with both indicators being used and no DT dot in either double top that is outlined was plotted. I have also attached the indicators as well.

Attached Thumbnails
PriceActionSwing discussion-es-5-minute-chart.jpg  
Attached Files
Register to download File Type: zip PriceActionSwing.zip (52.5 KB, 103 views)
Register to download File Type: cs PriceActionSwingPro.cs (228.8 KB, 81 views)
Register to download File Type: zip PriceActionSwingPro_added_custom_divergence_indicator_rvaluechart.zip (29.8 KB, 191 views)
Reply With Quote
     

Old January 28th, 2013, 05:02 PM   #669 (permalink)
Market Wizard
Columbus, OH
 
Futures Experience: None
Platform: NT-9G, TOS
Favorite Futures: ES
 
Silvester17's Avatar
 
Posts: 3,229 since Aug 2009
Thanks: 4,429 given, 9,899 received


gretzkyless View Post
Could someone please let me know if there is a different 'PriceActionSwing' or 'PriceActionSwingPro' indicator I should be using? Attached is a screen print with both indicators being used and no DT dot in either double top that is outlined was plotted. I have also attached the indicators as well.

@gretzkyless,

there's no "swing" in between. your first example, we had a higher high and then in order to have a double top, we would need first a higher low, a lower low or a double bottom. none is the case.

to see the smallest swings, you have to select 1 in "swing size". and to have more double tops and bottoms, you have to increase the "double top / bottom strength".

so the indicators are fine. the latest version is here:

Downloads - Free Section - Big Mike's Trading Forum

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

Reply With Quote
     
The following 2 users say Thank You to Silvester17 for this post:
     

Old January 28th, 2013, 06:06 PM   #670 (permalink)
Elite Member
Chicago, IL/USA
 
Futures Experience: Intermediate
Platform: Ninja Trader
Broker/Data: AMP Trading - CQG/ThinkorSwim
Favorite Futures: Futures
 
gretzkyless's Avatar
 
Posts: 29 since Jan 2013
Thanks: 11 given, 12 received


@Silvester

Thanks for the clarification. I will adjust the numbers until I find what I'm looking for in the indicator.

I was wondering something with the PriceActionSwing indicator. I used the wizard to create a strategy using this indicator to compare to the Higher High and Lower Low bars 2 bars back from the current bar, but the strategy generated an error. I'm new to coding, only 1 week of experience, and thought a simple strategy wizard generated code would be easy to create. Below is what I was trying to accomplish with the strategy:

If the current bar's Low/High is the same as the Lower Low/Higher High in either of the last 2 bars, take a long/short position with a 15 tick trailing stop.

Of course more would need to be included in order for this to be a good strategy, but was trying to make a simple strategy to see how the indicator would enter a position visually.

Attached Files
Register to download File Type: cs DTDB.cs (30.1 KB, 70 views)
Reply With Quote
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > PriceActionSwing discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Al Brooks: Stop Losing when a Good Trade goes Bad, Correcting Mistakes

Elite only
 

Trading Technologies: ADL hands-on

Dec 13

Normal webinar schedule resumes after the holidays

January

Ernie Chan: Risk Management

Elite only

Dedicated Trading Servers: Advantages/Disadvantages w/sam028

Elite only

An Afternoon with FIO member Massive I

Elite only

Leo Murphy: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Murray Math Discussion? jwhtrades Traders Hideout 5 July 27th, 2011 10:06 PM
Looking for general discussion thread. jctrader Traders Hideout 2 May 2nd, 2011 03:23 PM
PriceActionSwing jeff92887 NinjaTrader 2 March 1st, 2011 07:15 AM


All times are GMT -4. The time now is 01:23 PM.

Copyright © 2016 by 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 2016-12-09 in 0.13 seconds with 20 queries on phoenix via your IP 54.158.92.239