Need Help w/ PaintBar Code - EasyLanguage Programming | futures io social day trading
futures io futures trading


Need Help w/ PaintBar Code
Updated: Views / Replies:1,133 / 3
Created: by ChrisMoody Attachments:1

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
 

Need Help w/ PaintBar Code

  #1 (permalink)
Elite Member
Chapel Hill, NC
 
Futures Experience: Advanced
Platform: Trade Navigator, MultiCharts, TOS
Broker/Data: Stage 5, FXCM, IQ Feed
Favorite Futures: Futures, Forex, Options
 
ChrisMoody's Avatar
 
Posts: 12 since Aug 2011
Thanks: 22 given, 3 received

Need Help w/ PaintBar Code

Hello...Need someones Expertise.

I've coded several PaintBar indicators in MultiCharts. However, I'm running in to a problem with this code. The issue is the PaintBar colors ONLY 2 Bars after the condition = True on the second bar. Currently the code is painting every bar that meets the condition. Obviously I'm not coding the condition correctly.

See Screenshot for Visual which has the Rules that my code obviously isn't defining the rules correctly. I've never had to write code that only #1 PaintsBars Two Bars when the condition is true for current bar and bar[1]. #2 Only Paints 2 Bars when condition is True and no Additional bars until the condition becomes False....Then it should start over and paint the next two consecutive bars when the condition is true again.

Rule: If Low and Low[1] > than SMA Then PlotPaintBar for only those 2 Bars. The condition can't be True again until the Low of a bar is <= the SMA....after that the condition/Rule bocomes Valid again to plot the PaintBars if Two bars meet the criteria.

Code is Below....I took out a few conditions to keep code simple and I couldn't remember if the TRH and TRL needed to stay in...

 
Code
Inputs:
       UpColor2B(Green);
      
variables:
       MacH(0),
       TRH(0),
       TRL(0);
   
//MacH = SMA( Close, 10) ;
MacH = AverageFC( Close, 10) ;

TRH = maxlist( close[1], high);
TRL = minlist( close[1], Low);
      
condition1 = Low > MacH ;

if condition1 then
       begin
       PlotPaintBar(High, Low, Open, Close, "2BarUp", UpColor2B);
       //PlotPaintBar(High[1], Low[1], Open[1], Close[1], "2BarUp", UpColor2B);
       //PlotPaintBar(High, Low, Open, Close, "2BarUp", UpColor2B);
       Alert ;
       End ;

Thanks SOO Much for Your Help!!!

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

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)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


ChrisMoody,

you need to check for the number of bars you allow to plot. In your code you could start a counter when Condition1 is true and as long as the counter <= 2 (or any other input) the paintbars are allowed to plot.
When Condition1 = false you set the counter back to 0.

 
Code
Inputs:
       UpColor2B(Green),
       BarsToPlot(2);
      
variables:
	Counter(0),
       MacH(0),
       TRH(0),
       TRL(0);
   
//MacH = SMA( Close, 10) ;
MacH = AverageFC( Close, 10) ;

TRH = maxlist( close[1], high);
TRL = minlist( close[1], Low);
      
condition1 = Low > MacH ;

if condition1 = false then
	Counter = 0;

if condition1 then 
	Counter += 1;
	
if Counter > 0 and Counter <= BarsToPlot then
       begin
       PlotPaintBar(High, Low, Open, Close, "2BarUp", UpColor2B);
       //PlotPaintBar(High[1], Low[1], Open[1], Close[1], "2BarUp", UpColor2B);
       //PlotPaintBar(High, Low, Open, Close, "2BarUp", UpColor2B);
       Alert ;
       End ;
Regards,
ABCTG


ChrisMoody View Post
Hello...Need someones Expertise.

I've coded several PaintBar indicators in MultiCharts. However, I'm running in to a problem with this code. The issue is the PaintBar colors ONLY 2 Bars after the condition = True on the second bar. Currently the code is painting every bar that meets the condition. Obviously I'm not coding the condition correctly.

See Screenshot for Visual which has the Rules that my code obviously isn't defining the rules correctly. I've never had to write code that only #1 PaintsBars Two Bars when the condition is true for current bar and bar[1]. #2 Only Paints 2 Bars when condition is True and no Additional bars until the condition becomes False....Then it should start over and paint the next two consecutive bars when the condition is true again.

Rule: If Low and Low[1] > than SMA Then PlotPaintBar for only those 2 Bars. The condition can't be True again until the Low of a bar is <= the SMA....after that the condition/Rule bocomes Valid again to plot the PaintBars if Two bars meet the criteria.

Code is Below....I took out a few conditions to keep code simple and I couldn't remember if the TRH and TRL needed to stay in...

 
Code
Inputs:
       UpColor2B(Green);
      
variables:
       MacH(0),
       TRH(0),
       TRL(0);
   
//MacH = SMA( Close, 10) ;
MacH = AverageFC( Close, 10) ;

TRH = maxlist( close[1], high);
TRL = minlist( close[1], Low);
      
condition1 = Low > MacH ;

if condition1 then
       begin
       PlotPaintBar(High, Low, Open, Close, "2BarUp", UpColor2B);
       //PlotPaintBar(High[1], Low[1], Open[1], Close[1], "2BarUp", UpColor2B);
       //PlotPaintBar(High, Low, Open, Close, "2BarUp", UpColor2B);
       Alert ;
       End ;

Thanks SOO Much for Your Help!!!

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Elite Member
Chapel Hill, NC
 
Futures Experience: Advanced
Platform: Trade Navigator, MultiCharts, TOS
Broker/Data: Stage 5, FXCM, IQ Feed
Favorite Futures: Futures, Forex, Options
 
ChrisMoody's Avatar
 
Posts: 12 since Aug 2011
Thanks: 22 given, 3 received

ABCTG - Thanks!!!


Quoting 
you need to check for the number of bars you allow to plot. In your code you could start a counter when Condition1 is true and as long as the counter <= 2 (or any other input) the paintbars are allowed to plot.
When Condition1 = false you set the counter back to 0.

ABCTG,

Thank You....Greatly Appreciate it...

Reply With Quote

Reply



futures io > > > > > Need Help w/ PaintBar Code

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
Help with paintbar - should be an easy one! tozwp EasyLanguage Programming 4 February 14th, 2012 12:44 PM
Help with paintbar code. bfreefalling NinjaTrader Programming 2 April 28th, 2011 10:54 AM
Paintbar for SMI2 TraderAZ NinjaTrader 2 August 22nd, 2009 01:08 AM
New Paintbar 4 Shortterm wh NinjaTrader Programming 2 July 3rd, 2009 05:04 AM


All times are GMT -4. The time now is 05:59 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-15 in 0.10 seconds with 20 queries on phoenix via your IP 54.145.16.43