UPdate strategy and bar colors - NinjaTrader Programming | futures io social day trading
futures io futures trading


UPdate strategy and bar colors
Updated: Views / Replies:2,088 / 9
Created: by nanook77 Attachments:2

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
 

UPdate strategy and bar colors

  #1 (permalink)
Elite Member
OKC, OK
 
Futures Experience: Advanced
Platform: Ninja Trader, Trade Navigator. ToS
Broker/Data: PFG/CQG
Favorite Futures: forex, futures
 
nanook77's Avatar
 
Posts: 23 since Jun 2010
Thanks: 84 given, 8 received

UPdate strategy and bar colors

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!
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)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,355 given, 83,237 received



nanook77 View Post
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.

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.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #4 (permalink)
Elite Member
OKC, OK
 
Futures Experience: Advanced
Platform: Ninja Trader, Trade Navigator. ToS
Broker/Data: PFG/CQG
Favorite Futures: forex, futures
 
nanook77's Avatar
 
Posts: 23 since Jun 2010
Thanks: 84 given, 8 received

Update strategy and bar colors


Big Mike View Post
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.

Mike

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!
Attached Thumbnails
UPdate strategy and bar colors-7-24-2011-2-07-42-pm-strategy-problem.png  
Attached Files
Register to download File Type: zip HLCrossSlope.zip (7.9 KB, 24 views)
Reply With Quote
 
  #5 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,355 given, 83,237 received

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.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

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,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary


nanook77 View Post
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

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.

Reply With Quote
 
  #7 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Question:

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:
 
Code
			if(High[0] < High[1] && Low[0] > Low[1]) 
			{
				BarColor = barColorInside;
			}
How do you change it back once that condition is no longer met, particularly intra-bar?


Last edited by forrestang; November 7th, 2011 at 10:53 AM.
Reply With Quote
 
  #8 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary


forrestang View Post
Question: How do you change it back once that condition is no longer met, particularly intra-bar?

You may try this:

 
Code
            if(High[0] < High[1] && Low[0] > Low[1]) 
            {
                BarColor = barColorInside;
            }
            else
                BarColor = Color.Empty;

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #9 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


Fat Tails View Post
You may try this:

 
Code
            if(High[0] < High[1] && Low[0] > Low[1]) 
            {
                BarColor = barColorInside;
            }
            else
                BarColor = Color.Empty;

It must be the way I have this script structured, as I've tried this before and it produced undesirable effects.

Reply With Quote
 
  #10 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,220 since Jun 2009
Thanks: 628 given, 6,318 received
Forum Reputation: Legendary


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;



// Sets the color of the previous bar to orange.

BarColorSeries[1] = Color.Orange;

Reply With Quote
The following user says Thank You to cory for this post:

Reply



futures io > > > > > UPdate strategy and bar colors

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
Close bar recognization in multi time frame strategy pinto552 NinjaTrader Programming 6 September 6th, 2011 10:07 AM
Tradestation colors Sezor TradeStation 3 November 15th, 2010 08:40 AM
RBG Colors trs3042 Traders Hideout 3 November 3rd, 2010 06:53 PM
Simple 30M Bar Strategy Won't Go vegasfoster NinjaTrader Programming 3 October 23rd, 2010 08:31 PM
NT 7 Update TAJTrades NinjaTrader 21 October 22nd, 2009 07:12 PM


All times are GMT -4. The time now is 07:46 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-17 in 0.13 seconds with 20 queries on phoenix via your IP 54.163.209.109