PriceActionSwing discussion (Page 62) - 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:391,999 / 1,345
Last Reply:12 Hours Ago (10:10 PM) 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 November 16th, 2012, 12:57 PM   #611 (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,424 given, 9,888 received


Nowshad View Post
I knew about the Gann paint bars but I was looking for standard swing options paint bars.

@Nowshad,

I added the paint bars. if you would like to try them send me a pm.

out of respect, I'm not going to post that modified indicator here.

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 4 users say Thank You to Silvester17 for this post:
     

Old November 16th, 2012, 01:27 PM   #612 (permalink)
davidepalmer
Duluth GA USA
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: 6e and YM
 
Posts: 38 since Jul 2012
Thanks: 74 given, 35 received

Standard Swing Paint Bars

Nowshad, Thx for your help here. I would appreciate getting the updated indicator for PAS with the color candles for std swings. I use std swings also and really appreciate your work here. A post in the thread would be fine great. Thx for sharing.
David Palmer

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

Old November 17th, 2012, 11:52 AM   #613 (permalink)
Elite Member
Los Angeles, California
 
Futures Experience: Intermediate
Platform: Tradestation Ninja TOS
Broker/Data: AMP Tradestation TOS
Favorite Futures: ES NQ CL 6E
 
Nowshad's Avatar
 
Posts: 46 since May 2010
Thanks: 15 given, 14 received

PAS Standard Paintbars


Davidepalmer01, Silvester says he created the standard paintbars options for PAS (see above post) but its only available privately "out of respect" to the original . You should contact him about it.

Reply With Quote
     

Old November 17th, 2012, 12:28 PM   #614 (permalink)
davidepalmer
Duluth GA USA
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: 6e and YM
 
Posts: 38 since Jul 2012
Thanks: 74 given, 35 received

Thx

I will.
David Palmer

Reply With Quote
     

Old November 18th, 2012, 06:31 PM   #615 (permalink)
Trading Apprentice
london
 
Futures Experience: Master
Platform: NinjaTrader, ganntrader
Favorite Futures: beans
 
Posts: 9 since Nov 2012
Thanks: 2 given, 0 received

swingRelation

Futures Edge on FIO
Hi,

I am trying to get a trailing stop to trail swing lows/high by x amount of ticks.

I am also trying to draw the Swings in a back test environment what code would i need for this.

Thanks in advance for any help !!

BW

C


Last edited by charllie1; November 19th, 2012 at 08:01 AM.
Reply With Quote
     

Old November 21st, 2012, 02:51 PM   #616 (permalink)
Elite Member
Los Angeles, California
 
Futures Experience: Intermediate
Platform: Tradestation Ninja TOS
Broker/Data: AMP Tradestation TOS
Favorite Futures: ES NQ CL 6E
 
Nowshad's Avatar
 
Posts: 46 since May 2010
Thanks: 15 given, 14 received

Paintbars

I wish I could paint the bars to match the PriceActionSwingOscillator's wave volume color. I know it adjusts the color after confirmation but it would be logical and asthetically awesome to look at the price bars and wave volume in harmony. Unfortunately I am not a programming guru.

Reply With Quote
     

Old November 22nd, 2012, 07:47 PM   #617 (permalink)
Elite Member
Berlin Germany /Alicante Spain
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: DDT/Rithmic, Global/CQG, IB, Mirus(Ninja)/MarketDelta
Favorite Futures: Futures
 
Posts: 148 since Jan 2010
Thanks: 362 given, 66 received

I need the strategy code rows for definition of long and short trend

Dear members,
I want to take the trend direction from the PAS Oscillator as a basic of a simple trend following strategy. As I am no programmer I try to use the strategy wizard to do this but I think I have to copy a little code in because I cannot find a value for long or short trend in the oscillator indicator rows to compare in the wizard.

Could anyone send me the code for the rules I have to copy in the strategy code for long trend and short trend?

I really looked throug all 60 or more pages of this thread, on page 18 and following I think I found something about DT, DB, HH and LL but I really want to keep it simple, only making long trades when trend or swings show long and shorts when they how short.

Thank you for helping,
kind regards.
resist

Reply With Quote
     

Old November 23rd, 2012, 04:20 AM   #618 (permalink)
Trading Apprentice
london
 
Futures Experience: Master
Platform: NinjaTrader, ganntrader
Favorite Futures: beans
 
Posts: 9 since Nov 2012
Thanks: 2 given, 0 received

'NinjaTrader.Indicator.PriceActionSwing' does not contain a definition for 'SwingRela

Hi Folks,

I am playing around with the code below, i can get it compile using the pasO, however using this indicator the SwingRelation and SwingTrend seem to signal daily, not sure why this !!

Trying to use then on the pasPro i get the following errors

'NinjaTrader.Indicator.PriceActionSwing' does not contain a definition for 'SwingTrend' and no extension method 'SwingTrend' accepting a first argument of type 'NinjaTrader.Indicator.PriceActionSwing' could be found (are you missing a using directive or an assembly reference?)

and

'NinjaTrader.Indicator.PriceActionSwing' does not contain a definition for 'SwingRelation' and no extension method 'SwingRelation' accepting a first argument of type 'NinjaTrader.Indicator.PriceActionSwing' could be found (are you missing a using directive or an assembly reference?)

I have tried looking at the source code of the pasPro, read everything on this thread regarding this issue and have draw a blank. Any help would be greatly appreciated !!

Many thanks

Charlie



 
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.Indicator;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Strategy;
using PriceActionSwing.Utility;

#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    /// <summary>
    /// Enter the description of your strategy here
    /// </summary>
    [Description("Enter the description of your strategy here")]
    public class SwingTrendx : Strategy
{
        #region Variables
        // Wizard generated variables
		private int swingSize = 3; 
		private SwingTypes swingType = SwingTypes.Gann
		private int dtbStrength = 15; 
		private IDataSeries swingTrend; 
		private IDataSeries swingRelation; 
        private double dpt = 190.000; // Default setting for Daily Profit Target
        private int profit = 10; // Default setting for Profit
        private int stop = 15; // Default setting for Stop
        private int saftyStopLoss = 30; // 
        private double multBBs = 0.100;
        private double drdw = 600.000; // Default setting for Max Draw Down per Day
        private double maxtrades = 40.000; // Default setting for Max Trades
        int entryBar = 0;
        bool alreadyEnteredThisBar = false;
        private int priorTradesCount = 0;
        private double priorTradesCumProfit = 0;


        // User defined variables (add any user defined variables below)
        #endregion

        /// <summary>
        /// This method is used to configure the strategy and is called once before any strategy method is called.
        /// </summary>
        protected override void Initialize()
        {
            SetStopLoss("", CalculationMode.Ticks, SaftyStopLoss, false);
            //SetProfitTarget("", CalculationMode.Ticks, Profit);
            //SetTrailStop("", CalculationMode.Ticks, Stop, false);
            // SetStopLoss("", CalculationMode.Ticks, Stop, false);

            CalculateOnBarClose = true;
            TraceOrders = true;
        }

//        protected override void OnOrderTrace(DateTime timestamp, string message)
//        {
//            log("{0} Trace Order: {1}", timestamp, message);
//        }

        /// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        protected override void OnBarUpdate()
        {

			
            // At the start of a new session
            if (Bars.FirstBarOfSession)
            {
                priorTradesCount = Performance.AllTrades.Count;
                priorTradesCumProfit = Performance.AllTrades.TradesPerformance.Currency.CumProfit;

            }

//            if (Performance.AllTrades.TradesPerformance.Currency.CumProfit - priorTradesCumProfit >= DPT
//                    || Performance.AllTrades.TradesPerformance.Currency.CumProfit - priorTradesCumProfit <= -DRDW
//                    || Performance.AllTrades.Count - priorTradesCount == MaxTrades)
//            {
//                CancelAllOrders(true, false);
//                ExitMarket("DailyLimits");
//                return;
//            }

			if (CurrentBar < 1) 
			{ 
				if (swingTrend == null) 
		if (swingTrend == null) 
				swingTrend = PriceActionSwing(Input, dtbStrength, swingSize, swingType).SwingTrend; 
				if (swingRelation == null) 
				swingRelation = PriceActionSwing(Input, dtbStrength, swingSize, swingType).SwingRelation; 
			} 
			int trend = Convert.ToInt32(swingTrend[0]); 
			switch (trend) 
			{ 
			case -1: 
				// Down trend - do something 
			
				if (Position.MarketPosition == MarketPosition.Flat &&

                  ToTime(Time[0]) > ToTime(9, 00, 00)
                  && ToTime(Time[0]) < ToTime(14, 0, 0)
                  && CurrentBar != entryBar && alreadyEnteredThisBar == false
                  && MACD(12, 26, 5)[0] <= 0 
                 
                  && Close[0] < EMA(52)[0]
                  
                  && High[0] + 5.5 * TickSize >= EMA(52)[0]
                  && Close[0] == Low[0])
            {
                alreadyEnteredThisBar = true;
                entryBar = CurrentBar;


                EnterShort(DefaultQuantity, "S1");

            }
				
					break; 
			case 1: 
				// Up trend - do something 
				
					if (Position.MarketPosition == MarketPosition.Flat &&

                ToTime(Time[0]) > ToTime(9, 00, 00)
                && ToTime(Time[0]) < ToTime(14, 0, 0)
                && CurrentBar != entryBar && alreadyEnteredThisBar == false
                && MACD(12, 26, 5)[0] >= 0
                
                && Close[0] > EMA(52)[0]
                
                 && Low[0] + -5.5 * TickSize <= EMA(52)[0]
                 && Close[0] == High[0])
            {
                alreadyEnteredThisBar = true;
                entryBar = CurrentBar;

                EnterLong(DefaultQuantity, "L1");
                //EnterLong(DefaultQuantity, "Lg 1");

            }
					
					
					
					
					break; 
			default: 
				// No trend - do something or nothing 
				break; 
			} 

			
			

            alreadyEnteredThisBar = false;
            //*************************  exit condition 

           
            if (Position.MarketPosition != MarketPosition.Flat)
            {
                int pnl = (int) Math.Round(Position.GetProfitLoss(Close[0], PerformanceUnit.Points) / TickSize);

                if (Close[0] <= EMA(52)[0] + -3 * TickSize
                    || pnl <= Stop * -1 
                    || pnl >= Profit)
                {
                    ExitLong("X1", "L1");
                }


                if (Close[0] >= EMA(52)[0] + 3 * TickSize
                    || pnl <= Stop * -1
                    || pnl >= Profit)
                {
                    ExitShort("Xs1", "S1");
                }


            }
            //
        }

        #region Properties
        [Description("")]
        [GridCategory("Parameters")]
        public double MultBBs
        {
            get { return multBBs; }
            set { multBBs = Math.Max(0.0001, value); }
        }

        [Description("")]
        [GridCategory("Parameters")]
        public double DPT
        {
            get { return dpt; }
            set { dpt = Math.Max(1, value); }
        }
        [Description("")]
        [GridCategory("Parameters")]
        public double DRDW
        {
            get { return drdw; }
            set { drdw = Math.Max(1, value); }
        }
        [Description("")]
        [GridCategory("Parameters")]
        public double MaxTrades
        {
            get { return maxtrades; }
            set { maxtrades = Math.Max(1, value); }
        }
        [Description("")]
        [GridCategory("Parameters")]
        public int Profit
        {
            get { return profit; }
            set { profit = Math.Max(1, value); }
        }

        [Description("")]
        [GridCategory("Parameters")]
        public int Stop
        {
            get { return stop; }
            set { stop = Math.Max(1, value); }
        }

        [Description("")]
        [GridCategory("Parameters")]
        public int SaftyStopLoss
        {
            get { return saftyStopLoss; }
            set { saftyStopLoss = Math.Max(5, value); }
        }

        #endregion
    }
}

Reply With Quote
     

Old November 23rd, 2012, 04:25 AM   #619 (permalink)
Elite Member
Queensland, Australia
 
Futures Experience: Intermediate
Platform: NinjaTrader, eSignal
Broker/Data: I.B./eSignal
Favorite Futures: SPI,currency futures,emini's
 
Posts: 30 since Sep 2009
Thanks: 102 given, 40 received

PASPro Alerts ?

I'm trying to utilise the AB=CD audio alerts but nothing shows up in the "Alerts Window" or triggers the wav files.
I have the wav files in the respective folder.
I've included an example of a 6E 15min chart where 2 swings are equal.
Have I overlooked something ?
Any help would be greatly appreciated !!

Attached Thumbnails
PriceActionSwing discussion-paspro-audio-alerts.png  
Reply With Quote
     

Old November 23rd, 2012, 07:32 AM   #620 (permalink)
Intermediate
Charleston, SC
 
Futures Experience: Intermediate
Platform: NT7, TS2
Broker/Data: FXCM
Favorite Futures: GC, CL, 6E, FX
 
cal1152's Avatar
 
Posts: 67 since Sep 2011
Thanks: 459 given, 64 received

MA Alerts...



Aregon View Post
I'm trying to utilise the AB=CD audio alerts but nothing shows up in the "Alerts Window" or triggers the wav files.
I have the wav files in the respective folder.
I've included an example of a 6E 15min chart where 2 swings are equal.
Have I overlooked something ?
Any help would be greatly appreciated !!

@Aregon

Have you configured the Market Analyzer Alerts section for audio alerts yet? I get alerts on my MA screen, then I also get Alerts on the NT7 Alert screen, and I get audio alerts when there is a AB=CD formation, which includes what time frame the formation occurred. To do that you will need to configure the column and alert properties in MA.

If that is what you're wanting check out posts 520 through 523. That info should help. Also, I attached a few screenshots.

Cal

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


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


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 5 users say Thank You to cal1152 for this post:
     

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)
 

NinjaTrader 8: Features and Enhancements, Tips and Tricks

Dec 6
 

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

Elite only
 

Trading Technologies: Algo Design Lab hands-on

Dec 13
     

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 10:36 AM.

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-05 in 0.13 seconds with 20 queries on phoenix via your IP 23.23.54.109