NexusFi: Find Your Edge


Home Menu

 





PriceActionSwing discussion


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Silvester17 with 177 posts (570 thanks)
    2. looks_two dorschden with 99 posts (1,124 thanks)
    3. looks_3 Big Mike with 52 posts (90 thanks)
    4. looks_4 jmont1 with 51 posts (23 thanks)
      Best Posters
    1. looks_one dorschden with 11.4 thanks per post
    2. looks_two Silvester17 with 3.2 thanks per post
    3. looks_3 Big Mike with 1.7 thanks per post
    4. looks_4 sudhirc with 1.7 thanks per post
    1. trending_up 975,107 views
    2. thumb_up 2,947 thanks given
    3. group 613 followers
    1. forum 2,093 posts
    2. attach_file 615 attachments




 
Search this Thread

PriceActionSwing discussion

  #691 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


djkiwi View Post
Thanks @Silvester17. I stripped down one so it just includes this line. If you uncomment line 129 and try and compile it you will see what I mean. If it compiles for you then I have another problem. There appears to be a change to the syntax between the new version and old version I can't quite figure out.



Cheers
DJ

@djkiwi,

I'm sorry, but when it comes to that kind of stuff, I really stink.

the new pas version doesn't have a swing relation data series. still trying to find a way, but hopefully someone else will come to the rescue.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
11 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #692 (permalink)
 tst1 
Magadan Russia
 
Posts: 79 since Nov 2010


tst1 View Post
Hi folks!

Does anyone have an idea how to add an audible alert for each new swing?

Thanks in advance!



Bump...

Reply With Quote
  #693 (permalink)
 
para6ut's Avatar
 para6ut 
london united kingdom
 
Experience: None
Platform: Sierra Chart, S5T
Trading: ES
Posts: 58 since Jun 2012
Thanks Given: 1,226
Thanks Received: 91


Hi,

Was wondering if there is something like an opening swing indicator for ninja?

On FT71's charts there is an opening swing determined by the first peak and valley on his RTH ES 2500 volume chart?

Or is there a way to use the PAS indicator to be used for that purpose?

If not, would using a 1 minute Opening range indi be close?



Thanks

Reply With Quote
  #694 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643

That is not an automatic indicator on FT's charts, he uses discretion to determine the OS - it may correspond to the first swing you see on that chart, it may not.

Reply With Quote
Thanked by:
  #695 (permalink)
 OpalDragon 
Des Moines, Iowa
 
Experience: Advanced
Platform: Ninja Trader
Trading: 6E, CL, Anything that moves
Posts: 559 since Jun 2012
Thanks Given: 733
Thanks Received: 232

Guys ---

I posted this on the "Want your Ninja trader Indicator coded for free" thread - but maybe I should have posted it here...

~~~

I think I saw someone have a GOM CD on their chart -- but -- with the PRICE ACTION SWING "historical Swing" lines on it so that you could see if it had reached the high of the swing or crossed it.

I tried puting Price Action Swing on the GOM CD but it did not work.

Is there a way to get those horizontal lines running to the right from all the swings in the GOM CD...?

I really think I already saw someone have it on their charts - and it makes seeing double tops or divergence on the GomCD SO much easier.

I have searched all over the forum but I don't think it was an attachment in a post - it was a screenshot that I saw and I still haven't found it.

Would adding these lines going to the right add to much more work to the CPU ?

~THANKS~

Reply With Quote
  #696 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


Silvester17 View Post
@djkiwi,

I'm sorry, but when it comes to that kind of stuff, I really stink.

the new pas version doesn't have a swing relation data series. still trying to find a way, but hopefully someone else will come to the rescue.

@djkiwi,

I completely forgot about this. my apologies.

made some changes, hopefully it's working now.

 
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 djmainsignals3 : Indicator
    {
        #region Variables
        private int myInput0 = 1; // Default setting for MyInput0
        private TextPosition bPosition = TextPosition.BottomRight;
			private TextPosition tPosition = TextPosition.TopLeft;
			private TextPosition trPosition = TextPosition.TopRight;
			private TextPosition blPosition = TextPosition.BottomLeft;	
			private TextPosition center = TextPosition.Center;
		
			private Font textFontLarge		= new Font("Arial", 24, FontStyle.Bold);	
			private Font textFontMed		= new Font("Arial", 14, FontStyle.Bold);
			private Font textFontSmall		= new Font("Arial", 9, FontStyle.Bold);
		
			private string longsignal1	= "TFlongsignal.wav";
			private string shortsignal1	= "TFshortsignal.wav";
		
			private bool 		gomsingle = false;
			private bool		gomoneperday = true;
		
			private bool 		showinternals = true;			
		
			private double pullback =.05;
			private int neutralbar =10;
			private double taillength = 0.8;
			private int tickfactor =18;
		
			private double longmin = 0.12;
			private double longmax = 0.36;
			private double shortmin = 0.12;
			private double shortmax = 0.34;
		
			private double emashortlow = 5.5;
			private double emapriorshorthigh = 5.5;
		
			private string higherframe	= "TF 06-11";
			private int higherperiod = 20;
			
		
			private bool buyarrow = true;
		
			private int deltahigh = 200;			
			//private int deltahighest = deltahigh*2;
		
			private int deltalow = 200;
			//private int deltalowest = deltalow*2;
		
			private bool		deltasignals = false;
		
			private int alertduration =60;
		
			private int poc =150000;
		
		
		
		private int Variable0 = 0;
		
			

		
		
		// 	GomCD gcd;
		//	GomCD gcdc;
		//	GomCD gcdfile;
	//		GomDeltaVolume gvol;
		
			private int deltamax =200;
			private int deltamin =200;
			
		// PRICE ACTION SWING
		
			private int swingSize = 7;
			private SwingTypes swingType = SwingTypes.Standard;
			private int dtbStrength = 15;
			private DataSeries swingTrend;
		
			private int sessionstart = 630000;
			private int sessionend = 130000;
		
        #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; 
			CalculateOnBarClose = false;
			Add("^VIX", PeriodType.Minute,2);
			Add("^ADD", PeriodType.Minute,2);
			Add("^TICK", PeriodType.Minute,2);
			AddRenko(higherframe, higherperiod, MarketDataType.Last);
			BarsRequired = 3;
			swingTrend = new DataSeries(this);
		
			
        }

		protected override void OnStartUp()
        
		{
           
	if (gomoneperday)
	{							
//	gcd=GomCD(GomCDCalculationModeType.BidAsk, GomCDChartType.NonCumulativeChart, "Binary",Gom.FileModeType.OnePerDay, GomFilterModeType.None, 1, false); 
//	gcdc=GomCD(GomCDCalculationModeType.BidAsk, GomCDChartType.CumulativeChart, "Binary",Gom.FileModeType.OnePerDay, GomFilterModeType.None, 1, false); 
		
	 // Set the PriceActionSwingRelation value to to the   priceSwingRel series

   	swingTrend = PriceActionSwingOscillator(Input, dtbStrength, swingSize, swingType).SwingTrend;
	
		
		
	}	
			
			
        }
        protected override void OnBarUpdate()
    {
			
				{if (CurrentBar < 3)
		return;}	
			
	
			
			
			
	
		
				
        }

        #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("")]
        [GridCategory("Parameters")]
        public int MyInput0
        {
            get { return myInput0; }
            set { myInput0 = Math.Max(1, value); }
        }
		
		 [Description("")]
        [GridCategory("Parameters")]
        public int Poc
        {
            get { return poc; }
            set { poc = Math.Max(1, value); }
        }
		
	
		
		[Description("deltasignals")]
        [Category("Drawing Objects")]
        public bool Deltasignals
        {
            get { return deltasignals; }
            set { deltasignals = value; }
        }
		
		
		[Description("Show_Internals")]
        [Category("Drawing Objects")]
        public bool Showinternals
        {
            get { return showinternals; }
            set { showinternals = value; }
        }
		
		
		
		[Description("Sound file to play for long alert.")]
		[Category("Longer Timeframe")]
		public string Higherframe
		{
			get { return higherframe; }
			set { higherframe = value; }
		}
		
		[Description("Sound file to play for long alert.")]
        [Category("Longer Timeframe")]
        public int Higherperiod
        {
            get { return higherperiod; }
            set { higherperiod = Math.Max(1, value); }
        }				
		
		
		[Description("Sound file to play for long alert.")]
		[Category("Delta Percent Change")]
		public string Longsignal1
		{
			get { return longsignal1; }
			set { longsignal1 = value; }
		}
		
		[Description("Sound file to play for long alert.")]
		[Category("Delta Percent Change")]
		public string Shortsignal1
		{
			get { return shortsignal1; }
			set { shortsignal1 = value; }
		}
        #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 djmainsignals3[] cachedjmainsignals3 = null;

        private static djmainsignals3 checkdjmainsignals3 = new djmainsignals3();

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public djmainsignals3 djmainsignals3(int myInput0, int poc)
        {
            return djmainsignals3(Input, myInput0, poc);
        }

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public djmainsignals3 djmainsignals3(Data.IDataSeries input, int myInput0, int poc)
        {
            if (cachedjmainsignals3 != null)
                for (int idx = 0; idx < cachedjmainsignals3.Length; idx++)
                    if (cachedjmainsignals3[idx].MyInput0 == myInput0 && cachedjmainsignals3[idx].Poc == poc && cachedjmainsignals3[idx].EqualsInput(input))
                        return cachedjmainsignals3[idx];

            lock (checkdjmainsignals3)
            {
                checkdjmainsignals3.MyInput0 = myInput0;
                myInput0 = checkdjmainsignals3.MyInput0;
                checkdjmainsignals3.Poc = poc;
                poc = checkdjmainsignals3.Poc;

                if (cachedjmainsignals3 != null)
                    for (int idx = 0; idx < cachedjmainsignals3.Length; idx++)
                        if (cachedjmainsignals3[idx].MyInput0 == myInput0 && cachedjmainsignals3[idx].Poc == poc && cachedjmainsignals3[idx].EqualsInput(input))
                            return cachedjmainsignals3[idx];

                djmainsignals3 indicator = new djmainsignals3();
                indicator.BarsRequired = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                indicator.MyInput0 = myInput0;
                indicator.Poc = poc;
                Indicators.Add(indicator);
                indicator.SetUp();

                djmainsignals3[] tmp = new djmainsignals3[cachedjmainsignals3 == null ? 1 : cachedjmainsignals3.Length + 1];
                if (cachedjmainsignals3 != null)
                    cachedjmainsignals3.CopyTo(tmp, 0);
                tmp[tmp.Length - 1] = indicator;
                cachedjmainsignals3 = 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.djmainsignals3 djmainsignals3(int myInput0, int poc)
        {
            return _indicator.djmainsignals3(Input, myInput0, poc);
        }

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

// 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.djmainsignals3 djmainsignals3(int myInput0, int poc)
        {
            return _indicator.djmainsignals3(Input, myInput0, poc);
        }

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

I highlighted the changes I made.

Attached Files
Elite Membership required to download: djmainsignals3.cs
Reply With Quote
Thanked by:
  #697 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


OpalDragon View Post
Guys ---

I posted this on the "Want your Ninja trader Indicator coded for free" thread - but maybe I should have posted it here...

~~~

I think I saw someone have a GOM CD on their chart -- but -- with the PRICE ACTION SWING "historical Swing" lines on it so that you could see if it had reached the high of the swing or crossed it.

I tried puting Price Action Swing on the GOM CD but it did not work.

Is there a way to get those horizontal lines running to the right from all the swings in the GOM CD...?

I really think I already saw someone have it on their charts - and it makes seeing double tops or divergence on the GomCD SO much easier.

I have searched all over the forum but I don't think it was an attachment in a post - it was a screenshot that I saw and I still haven't found it.

Would adding these lines going to the right add to much more work to the CPU ?

~THANKS~

@OpalDragon,

not an easy task I'm afraid.

I believe it would need to be plotted in the price panel. in a sub panel only the dots will show up.

in my example I put the gom cd indicator in the price panel and made the price bars invisible.


Reply With Quote
Thanked by:
  #698 (permalink)
 OpalDragon 
Des Moines, Iowa
 
Experience: Advanced
Platform: Ninja Trader
Trading: 6E, CL, Anything that moves
Posts: 559 since Jun 2012
Thanks Given: 733
Thanks Received: 232

Yea your right Silvester---

but yea -- I meant the horizontal lines right on the Panel #2 on the GomCD on the bottom panel...





Basically like that is how I saw it... but of course with the horizontal lines sort of like the Price Action Swing indicator...

It would be easier to see the divergences..

Reply With Quote
  #699 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


OpalDragon View Post
Yea your right Silvester---

but yea -- I meant the horizontal lines right on the Panel #2 on the GomCD on the bottom panel...

Basically like that is how I saw it... but of course with the horizontal lines sort of like the Price Action Swing indicator...

It would be easier to see the divergences..

@OpalDragon,

ok. I understand now, I think.

you want the naked swings on cd based on cd itself. and not the swings on cd based on price.

that of course is possible too. but same conditions like explained earlier.


Reply With Quote
Thanked by:
  #700 (permalink)
 OpalDragon 
Des Moines, Iowa
 
Experience: Advanced
Platform: Ninja Trader
Trading: 6E, CL, Anything that moves
Posts: 559 since Jun 2012
Thanks Given: 733
Thanks Received: 232


Exactly like that! So we have to make Two Price Panels for it to work Silvester?

Reply With Quote




Last Updated on January 7, 2024


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts