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,163 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

  #1201 (permalink)
 
Elite Trader's Avatar
 Elite Trader 
Pune India
 
Experience: Beginner
Platform: NinjaTrader
Trading: Stocks
Posts: 28 since Apr 2015
Thanks Given: 56
Thanks Received: 15

Hi @sudhirc, @Silvester17, @dorschden and all...

If time permits please can you see my request in the above post #1197 and please see whether you guys can help me.

Thanks
Elite Trader.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
 
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
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
12 thanks
  #1202 (permalink)
 yeshe 
San Fransisco Ca
 
Experience: Intermediate
Platform: Ninjatrader
Broker: IB
Trading: forex
Posts: 17 since Jan 2014
Thanks Given: 5
Thanks Received: 1

Words cannot explain the benefits of being able to discuss an indicator like this.

Unfortunately I ran into some inconsistencies Using the RSI(14) divergence using the recent eurgbp daily chart.

setting: 04 Use close values = true
gives correct divergence see picture below




setting: 04 Use close values = false
gives incorrect divergence see picture below




Am i missing something or is this an error in the code?

kindly your response

Reply With Quote
Thanked by:
  #1203 (permalink)
 yeshe 
San Fransisco Ca
 
Experience: Intermediate
Platform: Ninjatrader
Broker: IB
Trading: forex
Posts: 17 since Jan 2014
Thanks Given: 5
Thanks Received: 1


wow you did a great job in making the code structured and accessible.

I have a general question:
Is there a (free) small editor for c# available that i can run on my standalone laptop (no ninjatrader installed)
Want to study the code while i am traveling.

Before i was copying the code into a word document but the open and closing of regions is not possible then.


like to know how you do this

Reply With Quote
  #1204 (permalink)
 
bizman70's Avatar
 bizman70 
toronto, ontario
 
Experience: Intermediate
Platform: ninja trader
Broker: sterling, iqfeed
Trading: es, nq, 6e
Posts: 363 since May 2010
Thanks Given: 41
Thanks Received: 140

Could be a simple answer just want to make sure - based on the strength of the swing - IE - 5 to plot a HH, does the indicator need to have a prior 5 bar's high lower then the current bar AND the next 5 bars after to have a lower high ?

so the plot is there after the initial 5 bars and it waits for 5 bars after the HH to confirm that its going to be the HH , if anywhere after the HH there is a higher bar then the HH will move and recalculate?

in simple terms for my understanding we need 5 bars before and 5 bars after to confirm a HH ?

please explain or confirm

thanks

Visit my NexusFi Trade Journal Reply With Quote
  #1205 (permalink)
isaacbabani
Miami, Florida
 
Posts: 2 since Sep 2013
Thanks Given: 2
Thanks Received: 0

Hello,

I am having a similar problem accessing values from the indicator and wondered if someone could provide some guidance.

In my declarations I use:
 
Code
using pasb = PriceActionSwing.Base;
I then declare the variable:

 
Code
private Indicator.PriceActionSwing pas;
and define it as:

 
Code
pas = PriceActionSwing(10, 5, pasb.SwingStyle.Standard, false);
from which I am able to access the HH/HL/LH/LL values by using:

 
Code
double hh = pas.HigherHigh[0]; 
double hl = pas.HigherLow[0]; 
double lh = pas.LowerHigh[0]; 
double ll = pas.LowerLow[0];
This all works fine and the local variables (hh/hl/lh/ll) all return the values I would expect.

My problem arises when attempting to access the properties of PriceActionSwing.Base. In particular, I would like to access the values of the boolean variable New and the integer variable Counter of the Swings class and the integer variable NewSwing of the SwingCurrent class. I have created an instance of the 2 relevant classes using:

 
Code
private pasb.SwingCurrent sc = new pasb.SwingCurrent(); 
private pasb.Swings swings = new pasb.Swings();
and sought to retrieve the variable values using:

 
Code
  
bool isNew      = swings.New; 
int  newSwing = sc.NewSwing;
int swingCnt   = swings.Counter;
I do get values for the variables, but in every case, the values are False, 0, 0. This is not what I would expect as it is clear from the chart that new swings are occurring at various points. The swings are confirmed by both the hh/hl/lh/ll variable values and the labels placed on the chart by indicator.

Can someone please advise how I may properly access the values from PriceActionSwing.Base in order to retrieve the variable values I expect?

Thank you.

Isaac


Elite Trader View Post
Hi @sudhirc, @Silvester17, @dorschden


I would like to access the PriceActionSwingPro Indicator values in Strategies, like series of swing highs and swing lows values and the series of the Absolute volume in the Strategies, Actually I want to capture Swing high and Swing low values (Prices). I see the Indicators coding but I am not able to understand. So Would you please be kind and show me an example of the public variables to access in Strategies. I have attached the picture for understanding what I am try to telling.

I am using these variables for understanding....


e.g : if (SwingLow[0] < SwingLow[1] && SwingVol[0] > SwingVol[1])
EnterLong();

if (SwingHigh[0] > SwingHigh[1] && SwingVol[0] < SwingVol[1])
EnterShort();


Thanks
Elite Trader.


Reply With Quote
  #1206 (permalink)
 
Elite Trader's Avatar
 Elite Trader 
Pune India
 
Experience: Beginner
Platform: NinjaTrader
Trading: Stocks
Posts: 28 since Apr 2015
Thanks Given: 56
Thanks Received: 15

Hi Isaac,

If you want to access swing change alert in the strategy...you can write the code in the PriceActionSwingPro Indicator.

1. Define the BoolSeries variable in the variable section.

private BoolSeries sC; // Swing Change

2. Write the code in the OnBrUpdate method.

if (((swingHigh.New == true && swingHigh.Update == false)
|| (swingLow.New == true && swingLow.Update == false)))
{
sC.Set(true);
}
else
sC.Set(false);


3. Declare the BoolSeries variable as a public variable in Properties section.

[Browsable(false)]
public BoolSeries SC
{
get { return sC; }
}



4. Create the instance variable in the Strategies variable section.

PriceActionSwingPro PASpro;

5. Finally call the values.

if (PASpro.SC[0] == true)
{
Print("\n\n Swing Change Alert "+" Time : "+Time[0]);
}



Thanks
Elite Trader.

Reply With Quote
Thanked by:
  #1207 (permalink)
isaacbabani
Miami, Florida
 
Posts: 2 since Sep 2013
Thanks Given: 2
Thanks Received: 0

Elite Trader,

Thank you for the great suggestions. Your approach will certainly remedy my issue. I wonder if you could take a moment to explain why I unable to get proper values for:
  1. The New and Counter methods of the Swings class
  2. The NewSwing method of the SwingsCurrent class

Am I referencing the methods improperly? Or perhaps I am misunderstanding what these methods are intended to do?

I just want to get a thorough understanding of what PriceActionPro.Base is able to do.

Thank you.

Isaac

Reply With Quote
  #1208 (permalink)
 
Elite Trader's Avatar
 Elite Trader 
Pune India
 
Experience: Beginner
Platform: NinjaTrader
Trading: Stocks
Posts: 28 since Apr 2015
Thanks Given: 56
Thanks Received: 15


isaacbabani View Post
Elite Trader,

Thank you for the great suggestions. Your approach will certainly remedy my issue. I wonder if you could take a moment to explain why I unable to get proper values for:
  1. The New and Counter methods of the Swings class
  2. The NewSwing method of the SwingsCurrent class

Am I referencing the methods improperly? Or perhaps I am misunderstanding what these methods are intended to do?

I just want to get a thorough understanding of what PriceActionPro.Base is able to do.

Thank you.

Isaac


Hi Isaac

Actually I am also new for this Indicator and try to understand the code. And the swing calculations are done in the PriceActionSwing.Base Indicator.
When will I know that I will tell you.

Thanks
Elite Trader.

Reply With Quote
Thanked by:
  #1209 (permalink)
forexcasted
Dalls + United States
 
Posts: 10 since Nov 2012
Thanks Given: 3
Thanks Received: 0


Silvester17 View Post
@tellytub,

when you download the newest version here:

Downloads - Free Section - Big Mike's Trading Forum

the file will include the following 3 indicators:

- price action swing
- price action swing pro
- price action swing oscillator

May i know if the PA swing oscillator repaints?, is it possible to build a strategy to enter and exit on the color change ? ( i am not sure if it repaints , thats why i wanted some advise) and also if anyone can build a strategy for me

Regards
V

Reply With Quote
  #1210 (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



forexcasted View Post
May i know if the PA swing oscillator repaints?, is it possible to build a strategy to enter and exit on the color change ? ( i am not sure if it repaints , thats why i wanted some advise) and also if anyone can build a strategy for me

Regards
V

the pas indicators do not repaint. it has been explained multiple times in this thread. here's a quote from @dorschden:


dorschden View Post
The PAS indicator is a real time indicator. I doesn't repaint, but of course it updates the swing values every time the swing gets higher or lower. And if a swing high moves from a lower high to a higher high the plot dot colour will change to the HH colour.

The only thing that is re-painting is the PasOsc volume part. Because every time we get a new bar that doesn't make a new swing high/low we don't know whether this bar belongs to the current swing or to the next swing that will come in the future. To highlight this situation the PasOsc volume draws the volume histogram according to the current swing direction and the plot line draws the volume to what the swing volume will change if the bars belong to the next swing which will change the swing direction.

The PasOsc trend will not re-paint. To see how it is used in a strategy you can look at the code in this post. To use it in a multi-time frame environment add another bar series and check in this bar series (barsInProgress == x) for the PasOsc swingTrend[0] == -1/0/1.

here, I tried to explain the difference between repainting and updating:


Silvester17 View Post
maybe a little example will clear up a few misunderstandings. I'm using a swing size of 8 ticks. that means as soon as the market moves 8 ticks from the last swing high/low, a new swing high/low will be shown.

example:

a new swing high (HH) is made at 2075.75. if the market would move up to 2077, this HH will also be moved to 2077 (btw that has nothing to do with repainting. that's called adjusting the current swing). if the market would move down, it needs to go at least (minimum) 8 ticks for a new swing low. that would be 2073.75



now the market moved down 7 ticks. nothing happened yet. remember we need to go at least 8 ticks lower for a new swing low



now the market moved finally down 8 ticks. that means a new swing low (HL) will be drawn



the market continues to go lower. the new HL will be adjusted



after reaching a new swing low of 2072.75, the market starts to move up again. no new swing high will be shown until we move at least 8 ticks from the last swing low. that would be 2074.75. if we would go to 2074.50, nothing would happen. we still would only see the swing low of 2072.75. and if we don't reach 2074.75 and instead start moving lower again, lets say to 2071, then the last swing low from 2072.75 will be moved to 2071. but in our example the market moved up to 2074.75 and therefore we made a new sing high (LH). and now the same game starts over again



those are the very basic functions of this great indicator.


edit:

also worth mentioning is that new feature in pas pro. it's called swing switch. if enabled, it will draw a triangle on the chart, meaning a new swing has been established. this feature will not get adjusted/moved. so you can always see where exactly the swing change occurred



with the last update, building strategies has been made even easier. there're also several examples in this thread.

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