NexusFi: Find Your Edge


Home Menu

 





Help with paintbar - should be an easy one!


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,426 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?
No book, only a stair: journaling fills where price move …
Cryptocurrency
My Rant with AMP Futures
Trading Reviews and Vendors
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
Datafeed for Atas
Platforms and Indicators
Trump Media to sell instant access to market-moving soci …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
Johnnys Journal
2 thanks
TopStep Trader disappointment
2 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,774


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,774

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