Bars Since Pivot - NinjaTrader Programming | futures io social day trading
futures io futures trading


Bars Since Pivot
Updated: Views / Replies:1,509 / 5
Created: by Baseheadz Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Bars Since Pivot

  #1 (permalink)
Elite Member
Las Vegas, USA
 
Futures Experience: Master
Platform: Ninja, Multicharts, Proprietary
Favorite Futures: Energies
 
Posts: 48 since Jun 2011
Thanks: 1 given, 9 received

Bars Since Pivot

I'm attempting to make a filter for identifying a number of bars since a pivot high or low. I have provided the code below. The issue is that currently I have not figured out the logic that properly identifies the pivot high or pivot low and to start counting from that pivot high or pivot low. Any suggestions?

Vars
private int BarsSinceHigh = 0;
private int BarsSinceLow = 0;
private bool BarCount1 = true;
private bool BarCount2 = true;

OBU()

if(MIN(Low,16)[0] < Low[0]) //How do instead create a condition to identify the pivot low?
{
BarsSinceLow=0;
BarCount1=false;

}
else BarsSinceLow++;

if(BarsSinceLow >= 8)
BarCount1 = true;


if(MAX(High,16)[0] > High[0]) How do instead create a condition to identify the pivot High?
{
BarsSinceHigh=0;
BarCount2=false;

}

else BarsSinceHigh++;

if(BarsSinceHigh >= 8)
BarCount2 = true;

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,600 received
Forum Reputation: Legendary


Identifying pivot highs and lows:

There are basically two methods of identifying highs and lows. One is based on the lookback period, the other one on the minimum deviation.

Lookback period: A pivot of strength 8 would be a candle with a higher high than the 8 preceding and 8 following candles. The pivot high or low would be unconfirmed, if such a candle has just plotted. Confirmation of the pivot high or low will be 8 bars later, if the provisory piovt high or low has not been taken out. I would mark that high or low already when a new candle has a higher high or lower low than the 8 preceding bars. Then keep it, if it is confirmed. To count the candles that have passed from this pivot just collect the CurrentBar, when the pivot is identified. Store the value somewhere. N bars later, you can call CurrentBar again and compare it with the stored value. The difference will be N.

Zigzag : A more elegant way to identify highs and lows is a zigzag indicator which is based on a minimum deviation. You can for example use the zigzag indicator of NinjaTrader and simply access the highs and lows.

Reply With Quote
 
  #4 (permalink)
Elite Member
Las Vegas, USA
 
Futures Experience: Master
Platform: Ninja, Multicharts, Proprietary
Favorite Futures: Energies
 
Posts: 48 since Jun 2011
Thanks: 1 given, 9 received

Thanks Fat Tails. I'm gonna try the zigzag method. Sounds awesome!

Reply With Quote
 
  #5 (permalink)
Elite Member
Las Vegas, USA
 
Futures Experience: Master
Platform: Ninja, Multicharts, Proprietary
Favorite Futures: Energies
 
Posts: 48 since Jun 2011
Thanks: 1 given, 9 received

Fat Tails,

How would you know when 8 bars has passed on the zigzag indicator after a high has occurred?

This is the overload for the zigzag:
ZigZag(DeviationType.Percent, 0.3, false).ZigZagHigh[8] //I put 8 for 8 bars ago

Reply With Quote
 
  #6 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,600 received
Forum Reputation: Legendary


Baseheadz View Post
Fat Tails,

How would you know when 8 bars has passed on the zigzag indicator after a high has occurred?

This is the overload for the zigzag:
ZigZag(DeviationType.Percent, 0.3, false).ZigZagHigh[8] //I put 8 for 8 bars ago

Have just checked that indicator. It is coded in such a weird way that it cannot be easily accessed. Better you code a zigzag indicator yourself.

Reply With Quote

Reply



futures io > > > > > Bars Since Pivot

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
renko bars vs range bars? shodson Traders Hideout 21 April 26th, 2012 04:52 PM
Pivot Point calculations trendisyourfriend Investor/RT 11 May 2nd, 2011 07:50 PM
NOT Floor Trader Pivot kami The Elite Circle 2 April 14th, 2011 12:01 PM
3 day Pivot pchofard The Elite Circle 2 August 21st, 2010 09:45 PM
need help - pivot issue Todd NinjaTrader Programming 2 January 22nd, 2010 10:17 AM


All times are GMT -4. The time now is 10:33 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@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 2017-12-12 in 0.10 seconds with 19 queries on phoenix via your IP 54.90.92.204