NexusFi: Find Your Edge


Home Menu

 





Range bar counter


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Serger with 7 posts (2 thanks)
    2. looks_two cbritton with 6 posts (4 thanks)
    3. looks_3 Big Mike with 3 posts (3 thanks)
    4. looks_4 RickW with 2 posts (0 thanks)
      Best Posters
    1. looks_one SPMC with 2 thanks per post
    2. looks_two Jura with 2 thanks per post
    3. looks_3 Big Mike with 1 thanks per post
    4. looks_4 cbritton with 0.7 thanks per post
    1. trending_up 16,979 views
    2. thumb_up 15 thanks given
    3. group 3 followers
    1. forum 21 posts
    2. attach_file 8 attachments




 
Search this Thread

Range bar counter

  #1 (permalink)
 
Serger's Avatar
 Serger 
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: Interactive Brokers
Trading: Ym, Es
Posts: 74 since Oct 2010
Thanks Given: 64
Thanks Received: 25

Somebody have a range bar counter for MC ???

would be greatly appreciated

Thank you so much

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
Better Renko Gaps
The Elite Circle
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
36 thanks
NexusFi site changelog and issues/problem reporting
25 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #2 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256

I got this one from the TS support site. Works great on the tick charts. Never tried it on range bars even though the indicator claims it works with range bars.

Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Attached Files
Elite Membership required to download: 20091228133326BARCOUNTDOWNTIMER2.ELD
Reply With Quote
Thanked by:
  #3 (permalink)
 
Serger's Avatar
 Serger 
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: Interactive Brokers
Trading: Ym, Es
Posts: 74 since Oct 2010
Thanks Given: 64
Thanks Received: 25


Thank you Cbritton ,
have you one idea why is d'ont work on Mc?
look picture ...
Thank you so much
Serger

Attached Thumbnails
Click image for larger version

Name:	bar_counter2.png
Views:	311
Size:	20.4 KB
ID:	40352  
Started this thread Reply With Quote
  #4 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256


Serger View Post
Thank you Cbritton ,
have you one idea why is d'ont work on Mc?
look picture ...
Thank you so much
Serger

I did not write this indicator, but I'll try to help diagnose the problem. This is the code where this error message is generated:

 
Code
if 
    barType <> 0 and   // Tick/Volume Chart
    barType <> 1 and  // Intraday (Minute) Chart
    barType <> 11 and  // Momemtum Chart
    barType <> 12        // Range chart
then
    RaiseRuntimeError("Coundown Timer is only supported for Intrabar, Tick, Volume, Momentum or Range Charts");
...
So either your chart is not one of the above or MC identifies those charts differently than TS (by using the barType reserved word).

What chart type are you looking at when you get that error?

Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
Thanked by:
  #5 (permalink)
 SPMC 
GER
 
Experience: Advanced
Platform: MC
Trading: ES
Posts: 144 since May 2011
Thanks Given: 11
Thanks Received: 213

MC doesnt know bartype =12 and boxsize.Maybe this helps:
 
Code
input: Spacer ( "              ");
value2 = barinterval-(absvalue(high-low)/ (minmove/pricescale));
If barnumber=1 then 
   value1 = text_new_s(date,time_s,close,"Remain")
   else 
   text_SetLocation_s(value1 ,date,time_s,low -  minmove/pricescale);
   text_SetString(value1 ,Spacer+ "Remain "+ numtostr(value2  ,0));

Reply With Quote
Thanked by:
  #6 (permalink)
 
Serger's Avatar
 Serger 
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: Interactive Brokers
Trading: Ym, Es
Posts: 74 since Oct 2010
Thanks Given: 64
Thanks Received: 25

Hello cbritton ,SPMC ...

your bar counter work on minute bar no problems .. but i want it in Range bar (point) in Mc ..and i d'ont work ...
I try to change the code whith SPMC part .. and ..many error when i try to compile it ??
HAHAH !! i think is easy ..easy language ... but not sur now !!
If you have some idea.......
Thank you so much....

Started this thread Reply With Quote
  #7 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256

Serger, I modified the original indicator just for you. It will only work with range bars and it avoids using the reserved words that are not in MC. I have not tested out all of the features but it works on a range chart in TS. Create a new indicator and call it _RangeCountdownTimer. Copy the code below into it, compile and insert it on your chart.

Well...I don't know why I call it a timer since it's not timing anything, but anyways...

 
Code
{=====================================================================
    NAME:      _RangeCountdownTimer
    
    TYPE:    Indicator
    
}

inputs:
    VertTextPct(80{0-100}),
    NormColor(yellow),
    AlertColor(red),
    AlertPct(10{0-100}),
    DispMode(2 {1=Pct,2=Range}),
    dec(4)// Significant Decimals in Price
;
    
vars:
    { Text Object Vars }
    TxtStr(""),        // Text String  
    AlertStr(""),    // Alert Text String  
    TxtID(text_new(date,time,close, " ")),        // Text Object Reference
    
    { Constants }
    cDispPct(1),    // Option to display Percentages
    cDispRaw(2),    // Option to display Time/Tick/Vol Values

    Pad("    "),        // Pad to right of text display
    BarRange(0.1);

{== Initialization ===================================================}
        
    once begin

        // Check for valid input values
        if DispMode <> 1 and DispMode <> 2 then
            RaiseRuntimeError("The DispMode input must be set to 1 or 2");
        if VertTextPct > 100 or VertTextPct < 0 then
            RaiseRuntimeError("The VertTextPct input must be set between 0 and 100");
        if AlertPct > 100 or AlertPct < 0 then
            RaiseRuntimeError("The AlertPct input must be set between 0 and 100");
        // Chart Specific Init

        AlertStr = GetSymbolName+" bar has "+NumToStr(AlertPct,0)+"% remaining";

       end;
       
       if CurrentBar = 1 then begin
           // determine the range of the bar from the ones already shown
           BarRange = range[1];
       end;

{== Calculations ====================================================}
        
    if _LastBarOnChart then begin // Only display in real-time
        
        // Set Text Location from right of chart
        Value2 = Text_FloatLocation(TxtID, VertTextPct);

        // Calc Remaining value text
        if DispMode = cDispPct then  
            TxtStr = NumToStr((((BarRange - H+L) / BarRange) * 100), 0)+"%"+Pad
        else if DispMode = cDispRaw then
            TxtStr = NumToStr(BarRange - H+L, dec)+" "+Pad;
    
        // Display Text
        text_setstring(TxtID, TxtStr);
    
        // Trigger Alert / Use Alert Color
        if (((BarRange - H+L) / BarRange) * 100) < AlertPct then begin  
            text_SetColor(TxtID, AlertColor);
            Alert(AlertStr);
        end    else text_SetColor(TxtID, NormColor);

    end;
Set the dec value in the input to the number of significant digits for your instrument. For example, use 4 for 6E and 2 for ES. I did not test out the % remaining part.

Let me know how that works for you.

Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
Thanked by:
  #8 (permalink)
 
Serger's Avatar
 Serger 
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: Interactive Brokers
Trading: Ym, Es
Posts: 74 since Oct 2010
Thanks Given: 64
Thanks Received: 25

Cbritton,
it's work ... just that he walk on the top of the screen look atachments ....
But Thank you so much for your help !!!

Attached Thumbnails
Click image for larger version

Name:	TFconteur.png
Views:	447
Size:	32.9 KB
ID:	40591   Click image for larger version

Name:	TFcounter2.png
Views:	486
Size:	36.4 KB
ID:	40592   Click image for larger version

Name:	settings_counteur.png
Views:	407
Size:	47.7 KB
ID:	40593  
Started this thread Reply With Quote
  #9 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256


Serger View Post
Cbritton,
it's work ... just that he walk on the top of the screen look atachments ....
But Thank you so much for your help !!!

My TS chart doesn't do that. Must be something with the way MC puts the floating text on the screen. I'm sure someone with more MC knowledge than I can fix that.

Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
  #10 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,398 since Jun 2009
Thanks Given: 33,173
Thanks Received: 101,537



Serger View Post
Cbritton,
it's work ... just that he walk on the top of the screen look atachments ....
But Thank you so much for your help !!!

Can you clarify so I can take a look and see if I can help. I'm not understanding the problem.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on January 20, 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