CurrentBar help! - NinjaTrader Programming | futures io social day trading
futures io futures trading


CurrentBar help!
Updated: Views / Replies:395 / 5
Created: by kidvic 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
 

CurrentBar help!

  #1 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received

CurrentBar help!

Is there anyway to make CurrentBar = something else?
So when calculate bar on close is set to true, the second to last bar (Close[1]) is CurrentBar right?
And when calculate on bar close is set to false, the Close[0] is CurrentBar right?

Now is there anyway to make CurrentBar = another bar? meaning I could effectively call Close[3] as CurrentBar.
Is this possible.

In other words, can I make an indicator disregard the the last x number of bars, and start calculating currentbar from x candle,
Effectively what I want to do is shift the logic from close[0] to be close[3] (meaning currentbar has shifted 3) and also everything that follows, so close[1] effectively means close[4] if I have candle logic.

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
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,501 since Sep 2013
Thanks: 1,706 given, 3,705 received
Forum Reputation: Legendary


Currentbar is automatically set by the platform when a new bar is added to the series.

You need to create your own variable, which you can call 'offset'.
you then assign this variable with a positive or negative value, whatever you like the offset to be
and when you refer to a bar, you add/substract this from your index.

Reply With Quote
 
  #4 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received


rleplae View Post
Currentbar is automatically set by the platform when a new bar is added to the series.

You need to create your own variable, which you can call 'offset'.
you then assign this variable with a positive or negative value, whatever you like the offset to be
and when you refer to a bar, you add/substract this from your index.


Sorry, I probably wasn't specific enough.

I understand you can do this, I'm currently trying to figure:
the MAX function will start looking for the Max value of a given period. High, 10)[0]
This is will start at High[0] and look 10 bars back for the highest high.
and the HighestBar will give me the bar integer that produced that High.
However, if I use the Max function with high, 10)[5]
It will start at High[5] and look 10 bars from that point.

Now, how do I get the bar integer for that?
HighestBar only starts indexing from the currentbar, which is [0]

I can easily attain the value from the HighestBar int.
So I eliminated using the MAX function, so changing the CurrentBar would be ideal,
and not have to use the MAX function.


Last edited by kidvic; February 12th, 2016 at 03:12 AM. Reason: Clarify
Reply With Quote
 
  #5 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,501 since Sep 2013
Thanks: 1,706 given, 3,705 received
Forum Reputation: Legendary


kidvic View Post
Sorry, I probably wasn't specific enough.

I understand you can do this, I'm currently trying to figure:
the MAX function will start looking for the Max value of a given period. High, 10)[0]
This is will start at High[0] and look 10 bars back for the highest high.
and the HighestBar will give me the bar integer that produced that High.
However, if I use the Max function with high, 10)[5]
It will start at High[5] and look 10 bars from that point.

Now, how do I get the bar integer for that?
HighestBar only starts indexing from the currentbar, which is [0]

I can easily attain the value from the HighestBar int.
So I eliminated using the MAX function, so changing the CurrentBar would be ideal,
and not have to use the MAX function.


might be helpful to read:

https://futures.io/ninjatrader-programming/8037-highest-bar-close-occuring-within-last-x-number-bars-2.html

Reply With Quote
 
  #6 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received




Didn't help.Thanks

Reply With Quote

Reply



futures io > > > > > CurrentBar help!

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stochastics currentbar -1 Code Question sNeJ88 The Elite Circle 3 September 12th, 2015 06:48 PM
Stochastics currentbar -1 Code Question sNeJ88 NinjaTrader Programming 3 September 12th, 2015 10:14 AM
Confused about "Currentbar", using Ichimoku Cloud WPITrader EasyLanguage Programming 9 April 1st, 2015 03:55 PM
CurrentBar stepseazy Elite Automated Trading 2 August 31st, 2012 06:36 PM
Powerlangage and Currentbar Laurent EasyLanguage Programming 3 March 12th, 2011 09:33 AM


All times are GMT -4. The time now is 08:30 PM.

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-14 in 0.09 seconds with 19 queries on phoenix via your IP 54.221.73.186