NexusFi: Find Your Edge


Home Menu

 





Help with paintbar - should be an easy one!


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,700 views
    2. thumb_up 3 thanks given
    3. group 1 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Help with paintbar - should be an easy one!

(login for full post details)
  #1 (permalink)
tozwp
Milwaukee WI/US
 
Posts: 7 since Feb 2012
Thanks Given: 2
Thanks Received: 1

Never worked with paintbars before and am still new to programming. In Multicharts I am trying to paint/color the bars of a 24 hour chart that aren't during regular session hours a different color. I've tried this but nothing happens:
Inputs:
starttime(1516),endtime(829);
IfCurrentTime>starttimeandCurrentTime<endtimethen
PlotPaintBar(High,Low,Open,Close,"",Red)

I'm sure I'm doing something simple wrong but I don't have a clue! Thanks!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Looking for an MQL4 MetaTrader programmer/coder
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Request for MACD with option to use different MAs for fa …
NinjaTrader
Futures Close-Out Policy
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Daytrading ES & NQ
32 thanks
Battlestations: Show us your trading desks!
30 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Retail Trading As An Industry
25 thanks

(login for full post details)
  #3 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769


Hi,

I see several problems:
- your code does not respect MultiCharts syntax, it does not compile
- your start time is after your end time
- CurrentTime refers to the time of the computer whereas you should refer to the time of the bar (Time).

The following code works on my computer:
 
Code
Variables:
    StartTime    ( 829 ),
    EndTime    ( 1516 );
    
If Time > StartTime AND Time < EndTime then
    PlotPaintBar(High, Low, Open, Close, "", Red);
Nicolas

Visit my NexusFi Trade Journal Reply With Quote
The following 3 users say Thank You to Nicolas11 for this post:
(login for full post details)
  #4 (permalink)
tozwp
Milwaukee WI/US
 
Posts: 7 since Feb 2012
Thanks Given: 2
Thanks Received: 1

Thanks Nicolas. This sort of works but now it paints the regular session instead of the after hours session. Maybe I need to have it change the bar color from 1516 to 2400 and then again from 0 to 829? I'll try that. Thanks for your help.


Nicolas11 View Post
Hi,

I see several problems:
- your code does not respect MultiCharts syntax, it does not compile
- your start time is after your end time
- CurrentTime refers to the time of the computer whereas you should refer to the time of the bar (Time).

The following code works on my computer:
 
Code
Variables:
    StartTime    ( 829 ),
    EndTime    ( 1516 );
 
If Time > StartTime AND Time < EndTime then
    PlotPaintBar(High, Low, Open, Close, "", Red);
Nicolas


Reply With Quote
(login for full post details)
  #5 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769

My mistake. I read your first message too quickly.

Try:
If Time < StartTime OR Time > EndTime

Visit my NexusFi Trade Journal Reply With Quote





Last Updated on February 14, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts