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 960,529 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

  #641 (permalink)
 elgaza 
Toronto Canada
 
Experience: Master
Platform: NinjaTrader 7
Trading: ES
Posts: 109 since Jul 2011
Thanks Given: 16
Thanks Received: 18

Hi everyone

Could any body explain please how the PriceActionSwing works?

inother words how does it calculate the swing when does it plot the dot, I realy wanted to know

in oreder to understand the market better.

also is there a file or a site that explains about this indicator and what is every option there?

Thank you so much.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
55 thanks
NexusFi site changelog and issues/problem reporting
48 thanks
What percentage per day is possible? [Poll]
31 thanks
GFIs1 1 DAX trade per day journal
29 thanks

  #642 (permalink)
 resist 
Berlin Germany /Alicante Spain
 
Experience: Intermediate
Platform: NinjaTrader
Broker: DDT/Rithmic, Global/CQG, IB, Mirus(Ninja)/MarketDelta
Trading: Futures
Posts: 141 since Jan 2010
Thanks Given: 362
Thanks Received: 67

First start with post one of the thread and read and read, install the actual version, try the settings, then write again questions knowing this great indicator a little bit.

Reply With Quote
The following user says Thank You to resist for this post:
  #643 (permalink)
 elgaza 
Toronto Canada
 
Experience: Master
Platform: NinjaTrader 7
Trading: ES
Posts: 109 since Jul 2011
Thanks Given: 16
Thanks Received: 18


Come on I know I should read from the beginning but not all of us have the time

Couldn't some one just tell me in short how those dots are calculated?

Thank you for those who have a bit of patience

Reply With Quote
  #644 (permalink)
 
aligator's Avatar
 aligator 
Las Vegas, NV
Market Wizard
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65
Trading: Futures, Stocks, Options
Posts: 3,614 since Aug 2010
Thanks Given: 1,071
Thanks Received: 5,988


elgaza View Post
Come on I know I should read from the beginning but not all of us have the time

Couldn't some one just tell me in short how those dots are calculated?

Thank you for those who have a bit of patience

Information is spread out in the thread, but here is the easiest way. Download the indicator (If have not done already) then edit the open source code and read the code. It is pretty much organized in sections, so if you want to find out how something is calculated it is clearly laid out under that section. Can't be easier (No, I don't know the answer to your question)

But the swings (dots) are simply the moving highest highs or lowest lows of so many bars (number of bars a user option). Each swing (dot) is printed after the previous leg is completed, that means at least two new bars are completed in the new direction.

Nothing magic about this indicator. If you don't know what a swing is, you may not need this indicator, not yet.

Cheers!

Visit my NexusFi Trade Journal Reply With Quote
The following 4 users say Thank You to aligator for this post:
  #645 (permalink)
 solondon 
London, UK
 
Experience: Intermediate
Platform: ninja,TS,Meta,Tradeguider
Trading: FX,Metals
Posts: 38 since Sep 2011
Thanks Given: 9
Thanks Received: 6

Hi

trying to use PriceActionSwingOscillator in code unseccesfully, img of errors attached. Anyone able to help?



 
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 PriceActionSwing.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;
        #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;
        }

        /// <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.
			
			            // Condition set 1
//            if (EMA(10)[0] < EMA(50)[0]
//                && EMA(10)[0] < Bollinger(2, 20).Middle[0])
//            if (PriceActionSwingOscillator(15, 5, PriceActionSwingOscillator.Utility.SwingTypes.Gann).VHigh[0] > 0)
            if (PriceActionSwingOscillator(15, 5, swingType).VHigh[0] > 0)
            {
	            BackColor = Color.FromArgb(50,201,4,14);
            }

            // Condition set 2
//            if (EMA(10)[0] > EMA(50)[0]
//                && EMA(10)[0] > Bollinger(2, 20).Middle[0])
            if (PriceActionSwingOscillator(15, 5, swingType).VHigh[0] < 0)
            {
                BackColor = Color.FromArgb(50,26,166,10);
            }
        }

Attached Thumbnails
Click image for larger version

Name:	error.jpg
Views:	223
Size:	61.6 KB
ID:	97720  
Reply With Quote
  #646 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394

Hi @solondon,

Try changing:
private SwingTypes swingType = SwingTypes.Gann;

to:
private PriceActionSwingOscillator.Utility.SwingTypes swingType = PriceActionSwingOscillator.Utility.SwingTypes.Gann;

Let me know if that doesn't work.




solondon View Post
Hi

trying to use PriceActionSwingOscillator in code unseccesfully, img of errors attached. Anyone able to help?



 
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 PriceActionSwing.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;
        #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;
        }

        /// <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.
			
			            // Condition set 1
//            if (EMA(10)[0] < EMA(50)[0]
//                && EMA(10)[0] < Bollinger(2, 20).Middle[0])
//            if (PriceActionSwingOscillator(15, 5, PriceActionSwingOscillator.Utility.SwingTypes.Gann).VHigh[0] > 0)
            if (PriceActionSwingOscillator(15, 5, swingType).VHigh[0] > 0)
            {
	            BackColor = Color.FromArgb(50,201,4,14);
            }

            // Condition set 2
//            if (EMA(10)[0] > EMA(50)[0]
//                && EMA(10)[0] > Bollinger(2, 20).Middle[0])
            if (PriceActionSwingOscillator(15, 5, swingType).VHigh[0] < 0)
            {
                BackColor = Color.FromArgb(50,26,166,10);
            }
        }


Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to NJAMC for this post:
  #647 (permalink)
 solondon 
London, UK
 
Experience: Intermediate
Platform: ninja,TS,Meta,Tradeguider
Trading: FX,Metals
Posts: 38 since Sep 2011
Thanks Given: 9
Thanks Received: 6


NJAMC View Post
Hi @solondon,

Try changing:
private SwingTypes swingType = SwingTypes.Gann;

to:
private PriceActionSwingOscillator.Utility.SwingTypes swingType = PriceActionSwingOscillator.Utility.SwingTypes.Gann;

Let me know if that doesn't work.

I still get
The type name 'Utility' does not exist in the type 'NinjaTrader.Indicator.PriceActionSwingOscillator'

I also tried changing the using to using PriceActionSwingOscillator.Utility but I cant work out whats wrong in the type library seeing as your fix explicitly declares it. Any other ideas?

Reply With Quote
  #648 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394


solondon View Post
I still get
The type name 'Utility' does not exist in the type 'NinjaTrader.Indicator.PriceActionSwingOscillator'

I also tried changing the using to using PriceActionSwingOscillator.Utility but I cant work out whats wrong in the type library seeing as your fix explicitly declares it. Any other ideas?

Humm.... Okay, I don't have that Indicator loaded, I will try it tonight and let you know, but what might have happened it the Oscillator may be dependent upon one of the non-oscillator versions of PAS. Try this for now:

private PriceActionSwing.Utility.SwingTypes swingType = PriceActionSwing.Utility.SwingTypes.Gann;

(Looks like this may be correct based upon the USING statement in your code example)

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to NJAMC for this post:
  #649 (permalink)
 solondon 
London, UK
 
Experience: Intermediate
Platform: ninja,TS,Meta,Tradeguider
Trading: FX,Metals
Posts: 38 since Sep 2011
Thanks Given: 9
Thanks Received: 6


NJAMC View Post
Humm.... Okay, I don't have that Indicator loaded, I will try it tonight and let you know, but what might have happened it the Oscillator may be dependent upon one of the non-oscillator versions of PAS. Try this for now:

private PriceActionSwing.Utility.SwingTypes swingType = PriceActionSwing.Utility.SwingTypes.Gann;

(Looks like this may be correct based upon the USING statement in your code example)

error on compile still exists, thanks for taking the time to reply if you can spare the time i really appreciate the help to get this working

Reply With Quote
  #650 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394



solondon View Post
error on compile still exists, thanks for taking the time to reply if you can spare the time i really appreciate the help to get this working

Okay,

I can't install the Oscillator version for some reason, but I can see the "using" statement is this:

using PriceActionSwingOscillator.Utility;
Replace this line with the above:
using PriceActionSwing.Utility;

You can then probably use your original code or the Oscillator version.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to NJAMC for this post:





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