PriceActionSwing discussion (Page 110) - 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,561 / 1,343
Last Reply:December 1st, 2016 (04:53 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 September 15th, 2014, 06:09 AM   #1091 (permalink)
Elite Member
Duisburg, Germany
 
Futures Experience: Intermediate
Platform: TWS, NinjaTrader, MT4
Broker/Data: FXCM, Interactive Brokers, Oanda
Favorite Futures: Forex
 
Posts: 129 since Aug 2013
Thanks: 55 given, 44 received

Script parameter

Hello

I am struggling with figuring out one of the parameters when attempting to use this with another indicator.

I am simply trying to code an indicator that will keep a running total of the Higher High, Lower High, & Double Tops. In the list of the parameters when referencing this indicator, it says "SwingStyle swingType".

As far as I can tell, I have inputted the other parameters correctly, but this one I can not figure out exactly what I am supposed to place there. I have tried placing "Standard", or "SwingStyle.Standard" or "swingType.Standard" and none of them are working. With all of them I get the compile error saying "XYZ does not exist in the current context."

Could somebody please let me know what I am supposed to put in this parameter if I wise to use Standard swing type?

Thank you very much for your help!!

"Most people overestimate what they can do in 1 year and underestimate what they can do in 10 years."
Reply With Quote
     

Old September 17th, 2014, 02:15 AM   #1092 (permalink)
Elite Member
Australia
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: Oil
 
Posts: 16 since Jun 2012
Thanks: 16 given, 2 received

Minimum Swing Size in Ticks before drawing fib

Hello,

I have been using this great indicator for a few weeks now. Thanks to the creator and contributors.

I was wondering if a user defined minimum swing size in ticks/points could be set before drawing the fib retracement or extension. The fibs get a bit messy with smaller swings.

Thanks

Reply With Quote
     

Old September 17th, 2014, 06:52 AM   #1093 (permalink)
Elite Member
Duisburg, Germany
 
Futures Experience: Intermediate
Platform: TWS, NinjaTrader, MT4
Broker/Data: FXCM, Interactive Brokers, Oanda
Favorite Futures: Forex
 
Posts: 129 since Aug 2013
Thanks: 55 given, 44 received


Hello

I am just wondering if anybody has an answer for Post #1091. Even if just a couple of words without any explanation would be really great to fulfill my needs.

Thank you very much!!!

"Most people overestimate what they can do in 1 year and underestimate what they can do in 10 years."
Reply With Quote
     

Old September 18th, 2014, 02:05 AM   #1094 (permalink)
3rd times a charm!
San Francisco CA
 
Futures Experience: Intermediate
Platform: Ninja
Broker/Data: CQG
Favorite Futures: ES
 
Zxeses's Avatar
 
Posts: 139 since Jun 2014
Thanks: 90 given, 171 received


JGSmith View Post
Hello

I am struggling with figuring out one of the parameters when attempting to use this with another indicator.

I am simply trying to code an indicator that will keep a running total of the Higher High, Lower High, & Double Tops. In the list of the parameters when referencing this indicator, it says "SwingStyle swingType".

As far as I can tell, I have inputted the other parameters correctly, but this one I can not figure out exactly what I am supposed to place there. I have tried placing "Standard", or "SwingStyle.Standard" or "swingType.Standard" and none of them are working. With all of them I get the compile error saying "XYZ does not exist in the current context."

Could somebody please let me know what I am supposed to put in this parameter if I wise to use Standard swing type?

Thank you very much for your help!!

#region Using declarations
using PriceActionSwing.Base;
#endregion

#region Variables
private SwingStyle MyswingType = SwingStyle.Standard;
private PriceActionSwingPro pasP;
#endregion

protected override void OnStartUp()
{
pasP = PriceActionSwingPro(20, 7, MyswingType, false);
}

Thats as far as I've been able to get, I'm trying to extract info about the last swing to discover what it was, but after reviewing the code over and over I've not yet figured it out. I've been through about 10 or so pages of posts, I'll let you know if I find the post or discover the solution in code.

-Zx

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

Old September 21st, 2014, 04:41 PM   #1095 (permalink)
Identify Evaluate Execute
Mercer Island WA
 
Futures Experience: Advanced
Platform: Ninjatrader/Strategy Desk
Broker/Data: Various
Favorite Futures: TF/NQ/ES/Stocks
 
djkiwi's Avatar
 
Posts: 561 since May 2010
Thanks: 980 given, 1,515 received

Futures Edge on FIO

JGSmith View Post
Hello

I am just wondering if anybody has an answer for Post #1091. Even if just a couple of words without any explanation would be really great to fulfill my needs.

Thank you very much!!!

I'm not really sure what you guys are trying to do but this is how I'm accessing the revised swing indicator for other indicators. You can use the same concept for the pro version.

delcarations

using PriceActionSwing.Utility;

variables

private int dtbStrength = 15;
private int swingSize = 4;
private SwingTypes swingType = SwingTypes.Gann;
private IDataSeries swingRelation;

onstartup

swingRelation = PriceActionSwing(Input, dtbStrength, swingSize, swingType).SwingRelation;

onbarupdate

for buy signals swingRelation[0] == 1
for sell signals swingRelation[0] == -1

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

Old September 22nd, 2014, 04:15 PM   #1096 (permalink)
Elite Member
london, UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: NT
Favorite Futures: Stocks, Bonds
 
Posts: 131 since Sep 2013
Thanks: 151 given, 52 received

PAS Strategy

It looks like that I may be missing a file, when I compile the script posted on page 60 for the strategy base, I get the errors that "The namespace Utility does not exist in the NameSpace PriceActionSwing. I believe I may be missing a file possibly because SwingTypes can not be found either. Does any one have any information as to what file the Utility namespace is held so I can check if I have all of the correct files I need.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Any assistance on this would be greatly appreciated


Last edited by harry737; September 22nd, 2014 at 04:31 PM.
Reply With Quote
     

Old September 22nd, 2014, 04:59 PM   #1097 (permalink)
Market Wizard
Columbus, OH
 
Futures Experience: None
Platform: NT-9G, TOS
Favorite Futures: ES
 
Silvester17's Avatar
 
Posts: 3,228 since Aug 2009
Thanks: 4,421 given, 9,878 received


harry737 View Post
It looks like that I may be missing a file, when I compile the script posted on page 60 for the strategy base, I get the errors that "The namespace Utility does not exist in the NameSpace PriceActionSwing. I believe I may be missing a file possibly because SwingTypes can not be found either. Does any one have any information as to what file the Utility namespace is held so I can check if I have all of the correct files I need.

Any assistance on this would be greatly appreciated

you shouldn't be using "PriceActionSwing.Utility". that was used before the latest update. now we have "PriceActionSwing.Base"

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

Old September 22nd, 2014, 07:13 PM   #1098 (permalink)
Elite Member
london, UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: NT
Favorite Futures: Stocks, Bonds
 
Posts: 131 since Sep 2013
Thanks: 151 given, 52 received

PAS Strategy

What file is the SwingTypes enum is located in, there seems to be a missing reference related to this
#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;
#endregion
using PriceActionSwing.Base;
// 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 Test : Strategy
{

private int swingSize = 7;
private SwingTypes swingType = SwingTypes.Standard;
private int dtbStrength = 15;
private DataSeries swingTrend;

protected override void Initialize()
{
BarsRequired = 0;
CalculateOnBarClose = true;
Enabled = false;

swingTrend = new DataSeries(this);
}

protected override void OnStartUp()
{
//pasOsc = PriceActionSwingOscillator(Input, dtbStrength, swingSize, swingType);
//swingTrend = pasOsc.SwingTrend;

swingTrend = PriceActionSwingOscillator(Input, dtbStrength, swingSize, swingType).SwingTrend;
}

protected override void OnBarUpdate()
{
if (CurrentBar < 20)
return;

// For testing only
//DrawText(CurrentBar + "Tag", swingTrend[0].ToString(), 0, Low[0] - 10 * TickSize, Color.Red);

if (Position.MarketPosition == MarketPosition.Flat)
{
if (swingTrend[0] == 1)
EnterLong();
if (swingTrend[0] == -1)
EnterShort();
}
else if (Position.MarketPosition == MarketPosition.Long)
{
if (swingTrend[0] != 1)
ExitLong();
}
else if (Position.MarketPosition == MarketPosition.Short)
{
if (swingTrend[0] != -1)
ExitShort();
}
}

#region Properties
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
}
many Thanks,

Reply With Quote
     

Old September 23rd, 2014, 02:57 AM   #1099 (permalink)
Elite Member
Chicago, USA
 
Futures Experience: Advanced
Platform: TradeStation, NinjaTrader, Market Delta, TOS, StreetSmartEdge, OptionXpress
Favorite Futures: ES, currency futures, options, stocks
 
Posts: 170 since Dec 2010
Thanks: 264 given, 225 received

The variable declaration should be:

private SwingStyle swingType = SwingStyle.Standard;


if you are using the latest version of PAS indicator.

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

Old September 26th, 2014, 05:48 PM   #1100 (permalink)
Elite Member
Columbus
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: Es, forex, stocks
 
Posts: 22 since Oct 2011
Thanks: 7 given, 17 received

Novice Programmer


I'm back attempting to add price action swing to a strategy I want to back test. Thank you @dorschden for such a great indicator and all your help and hard work!

I don't know how to access when the indicator flips. I get an error about not being able to use this method with the following code. I asked a similar question awhile back and got this answer. According to this, I should be able to access the public bool series for the PpFlip and DnFlip functions.

@NathanExplosion, unfortunately this isn't possible. You have to change the code to accomplish this. There are several ways to do this. Because of your moderate coding skills I suggest that you create some variables to save the certain swing relations and make them public. E.g. create a variable called lastLowRelation2 in which you save the 3rd last swing low relation (swing low relation = LL, HL, DB) and in line 2582 you write "lastLowRelation2 = lastLowRelation;" Then you have in the variables curLowRelation, lastLowRelation, lastLowRelation2 the swing low relations. Now you have to make this variables accessible. In "Region Properties" in "Region Dataseries" you add following line for each variable (same for the long values). Now you should be able to access the values from within a strategy. I didn't test this, but it should work.


PriceActionSwingPro indicator

public BoolSeries DnFlip
{
get { return dnFlip; }
}

public BoolSeries UpFlip
{
get { return upFlip; }
}

my strategy

protected override void OnBarUpdate()
{
if (PriceActionSwingPro(20, 7, PriceActionSwing.Base.SwingStyle.Standard, false).UpFlip[0] == true)
{
// do something
}
else if (PriceActionSwingPro(20, 7, PriceActionSwing.Base.SwingStyle.Standard, false).DnFlip[0] == true)
{
// do something
}
}

Attached is the error I get when trying to compile my strategy. Anyone with C# experience know what's going on with this and how to get it to work?

Thanks in advance!

Attached Thumbnails
PriceActionSwing discussion-help.jpg  
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)
 

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 02:49 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-03 in 0.15 seconds with 20 queries on phoenix via your IP 54.197.75.176