Range bar counter - futures io
futures io futures trading



Range bar counter


Discussion in EasyLanguage Programming

Updated by Jura
      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.0 thanks per post
    2. looks_two Jura with 2.0 thanks per post
    3. looks_3 Big Mike with 1.0 thanks per post
    4. looks_4 cbritton with 0.7 thanks per post
    1. trending_up 12,490 views
    2. thumb_up 15 thanks given
    3. group 3 followers
    1. forum 21 replies
    2. attach_file 8 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Range bar counter

(login for full post details)
  #1 (permalink)
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: AMP Trading / CQG
Trading: Ym, Es
 
Serger's Avatar
 
Posts: 72 since Oct 2010
Thanks: 64 given, 24 received

Somebody have a range bar counter for MC ???

would be greatly appreciated

Thank you so much

Reply With Quote

Can you help answer these questions
from other members on futures io?
TOS script
ThinkOrSwim
DataLoader- incorrect cumulative values for other symbols
MultiCharts
FYI plot bug & workaround: changing color or width is delayed 1 bar
EasyLanguage Programming
TOS Custom Implied Volatility Rank Watchlist/Scanner Column
ThinkOrSwim
TOS script help - crossover with alerts - help please?
ThinkOrSwim
 
 
(login for full post details)
  #2 (permalink)
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 248 received

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
Register to download File Type: eld 20091228133326BARCOUNTDOWNTIMER2.ELD (17.3 KB, 178 views)
Reply With Quote
The following 2 users say Thank You to cbritton for this post:
 
(login for full post details)
  #3 (permalink)
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: AMP Trading / CQG
Trading: Ym, Es
 
Serger's Avatar
 
Posts: 72 since Oct 2010
Thanks: 64 given, 24 received


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:	83
Size:	20.4 KB
ID:	40352  
Reply With Quote
 
(login for full post details)
  #4 (permalink)
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 248 received


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
The following user says Thank You to cbritton for this post:
 
(login for full post details)
  #5 (permalink)
GER
 
Experience: Advanced
Platform: MC
Trading: ES
 
Posts: 144 since May 2011
Thanks: 11 given, 212 received

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
The following user says Thank You to SPMC for this post:
 
(login for full post details)
  #6 (permalink)
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: AMP Trading / CQG
Trading: Ym, Es
 
Serger's Avatar
 
Posts: 72 since Oct 2010
Thanks: 64 given, 24 received

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....

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 248 received

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
The following user says Thank You to cbritton for this post:
 
(login for full post details)
  #8 (permalink)
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: AMP Trading / CQG
Trading: Ym, Es
 
Serger's Avatar
 
Posts: 72 since Oct 2010
Thanks: 64 given, 24 received

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:	202
Size:	32.9 KB
ID:	40591   Click image for larger version

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

Name:	settings_counteur.png
Views:	173
Size:	47.7 KB
ID:	40593  
Reply With Quote
 
(login for full post details)
  #9 (permalink)
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 248 received


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
 
(login for full post details)
  #10 (permalink)
Site Administrator
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 48,909 since Jun 2009
Thanks: 31,586 given, 94,537 received



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

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my Facebook Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Big Mike for this post:


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Range bar counter


January 20, 2012


Upcoming Webinars and Events
 

Introducing Edge Pools: Prop Pricing Model w/Edge Clear

Jul 9
 

Every journal equals ten meals for the hungry

Now
     



Copyright © 2020 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