NexusFi: Find Your Edge


Home Menu

 





Help with paintbar - should be an easy one!


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #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?
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
Iran Airspace Collapses 18 Points to 15.5% While Hormuz …
Prediction Markets & Event Contracts
The May 31 Binary: 60% Trump Declares Iran Ops Over, Onl …
Prediction Markets & Event Contracts
Cboe Files for Near 24x5 Equities Trading -- December 20 …
Traders Hideout
UCL Final Kicks Off at Noon ET: PSG at 56.5% as Iran May …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
23 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #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,772


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
Thanked by:
  #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
  #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,772

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


© 2026 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 - Downloads - Top
no new posts