CurrentBar help! - futures io
futures io futures trading



CurrentBar help!


Discussion in NinjaTrader

Updated
    1. trending_up 801 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

CurrentBar help!

(login for full post details)
  #1 (permalink)
Los Angeles, CA
 
 
Posts: 92 since Mar 2015
Thanks: 13 given, 3 received

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

Can you help answer these questions
from other members on futures io?
Neurological explanations for trading Success
Psychology and Money Management
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Second Entry Indicator (Looking for testers/feedback)
NinjaTrader
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
SimplerOptions
Trading Reviews and Vendors
 
 
(login for full post details)
  #3 (permalink)
Gits (Hooglede) Belgium
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,991 since Sep 2013
Thanks: 2,437 given, 5,801 received


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.

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #4 (permalink)
Los Angeles, CA
 
 
Posts: 92 since Mar 2015
Thanks: 13 given, 3 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.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Gits (Hooglede) Belgium
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,991 since Sep 2013
Thanks: 2,437 given, 5,801 received


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:


Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #6 (permalink)
Los Angeles, CA
 
 
Posts: 92 since Mar 2015
Thanks: 13 given, 3 received


rleplae View Post
might be helpful to read:



Didn't help.Thanks

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > CurrentBar help!


Last Updated on February 12, 2016


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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