Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Issue: Have a set of indicators that run with my strategy.
The 'calculate on bar close' is set to false.
The criteria that changes the color of the background or the bar, functions correctly. However, during bar formation and at bar close, the criteria does not update, so if the bar started in one direction and triggered the strategy criteria, and then reversed direction, the bar coloration and background coloration, remain in place (triggered).
This strategy is being implemented on 'Better Renko" bars - if that makes a difference.
Thanks in advance for any help on how to resolve this.
Even when you stand firm in the rushing waters of life - only your Spirit is Perfect!
Can you help answer these questions from other members on NexusFi?
I read your post a few times but still am not clear. Your likely to receive the most help if you post your code so someone can look at it, and/or post a screenshot of what is happening vs. what should be happening.
hope this is helpful Mike. attached zip file and picture with callout. All i want it to do differently, is update the bar color during formation and at bar close. that allows be to make a decision while the bar is forming if i want to make a trade entry, prior to the close of the bar, and place my order and trigger price.
again - thx in advance.
nanook77
Even when you stand firm in the rushing waters of life - only your Spirit is Perfect!
I believe on FirstTickOfBar on the next bar, which is the first time you can do something after the current bar closes, you could go back and repaint the color of the prior bar if you want. But for a strategy, you would need to send it some kind of new signal via a dataseries.
I forget the syntax to do this, but I am sure others know, particularly @Fat Tails. Someone else recently asked this too.
You have exported the strategy as DLL, so no one can read the code and help you.
Basically you have too options to deal with the problem:
(1) You store the old BackColor somewhere. If the condition is met you change it. If then the condition is not met for a consecutive tick of the same bar, you change it back to the old value.
(2) You wait until the first tick of the following bar is triggered. You then check whether the condition has been met by the previous bar, and use BackColorSeries[1] to change the background color for that previous bar.
Both approaches will eliminate false intra-bar signals.
If using a color bar that you are changing.... and you want it to run calconBarClose == false........
Say you where coloring an INSIDE bar, where the highs/lows of that bar are inside the prior bar. And say then one of the highs breaks the prior high intrabar.
So you're snippet would look like this:
How do you change it back once that condition is no longer met, particularly intra-bar?
if you want to change color of the past bar then use barcolorseries,
BarColorSeries
Definition
A collection of historical bar colors.
Property Value
A color series type object. Accessing this property via an index value [int barsAgo] returns a color structure representing the referenced bar's color.
Note: This will only return the color of a bar in which an explicit color overwrite was used. Otherwise it will return Color [Empty].
Syntax
BarColorSeries
BarColorSeries[int barsAgo]
Examples
// Sets the color of the current bar to blue.
BarColorSeries[0] = Color.Blue;