Swing high to swing high counter? - futures io
futures io



Swing high to swing high counter?


Discussion in MultiCharts

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




Welcome to futures io: the largest futures trading community on the planet, with well over 150,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
 

Swing high to swing high counter?

(login for full post details)
  #1 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
 
Posts: 359 since Jul 2011
Thanks: 441 given, 536 received

Does anyone have an indicator that plots the number of bars from swing high to swing high and from swing low to swing low? Or anything similar like that? Some type of bar counter?

Thanks.

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Predictradercom - Automated Trading Strategy
Trading Reviews and Vendors
Prop firm /Eurex
Traders Hideout
 
 
(login for full post details)
  #2 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
 
Posts: 359 since Jul 2011
Thanks: 441 given, 536 received

I found this code and modified it to plot the bar numbers. How can I get it to plot the difference between the bar numbers from swing high to swing high and swing low to swing low rather than the bar numbers?

 
Code
INPUTS: 
STR(3),
TXT(TRUE),
DEC(2);


VARS: check1(10);

IF CURRENTBAR >-1 THEN BEGIN
   check1 = 2 * str + 2;
   IF SWINGHIGHBAR(1,TRUEHIGH,str, check1) = str THEN BEGIN
        IF TXT then BEGIN
            VALUE1 = Text_New(D[str],T[str],H[str]+.25*truerange,
            NUMTOSTR(BarNumber[str],DEC));                                                                        
            VALUE2 = Text_SetStyle(VALUE1,2,1); 
        END;
    END;

    IF SWINGLOWBAR(1,TRUELOW, str,check1)=str THEN BEGIN
        IF TXT THEN BEGIN
            VALUE1 = Text_New(D[str],T[str],L[str]-.25*truerange,
            NUMTOSTR(BarNumber[str],DEC));
            VALUE2 = Text_SetStyle(VALUE1,2,0); 
        END;
       END; 
       END;

Started this thread Reply With Quote
 
(login for full post details)
  #3 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,336 since Apr 2013
Thanks: 425 given, 1,558 received


Hi olobay,

you could for example store the bar number when you are detecting a new swing high/low and at the next swing high/low you can compute the difference using the value stored in the variable (just make sure to overwrite the value only after you computed the difference).
Another approach could be calling the functions again, but setting the Instance parameter to 2. Then you can compute the difference between the two function return values.

Regards,

ABCTG


olobay View Post
I found this code and modified it to plot the bar numbers. How can I get it to plot the difference between the bar numbers from swing high to swing high and swing low to swing low rather than the bar numbers?

 
Code
INPUTS: 
STR(3),
TXT(TRUE),
DEC(2);


VARS: check1(10);

IF CURRENTBAR >-1 THEN BEGIN
   check1 = 2 * str + 2;
   IF SWINGHIGHBAR(1,TRUEHIGH,str, check1) = str THEN BEGIN
        IF TXT then BEGIN
            VALUE1 = Text_New(D[str],T[str],H[str]+.25*truerange,
            NUMTOSTR(BarNumber[str],DEC));                                                                        
            VALUE2 = Text_SetStyle(VALUE1,2,1); 
        END;
    END;

    IF SWINGLOWBAR(1,TRUELOW, str,check1)=str THEN BEGIN
        IF TXT THEN BEGIN
            VALUE1 = Text_New(D[str],T[str],L[str]-.25*truerange,
            NUMTOSTR(BarNumber[str],DEC));
            VALUE2 = Text_SetStyle(VALUE1,2,0); 
        END;
       END; 
       END;


Follow me on Twitter Reply With Quote
The following 2 users say Thank You to ABCTG for this post:


futures io Trading Community Platforms and Indicators MultiCharts > Swing high to swing high counter?


Last Updated on July 28, 2022


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2022 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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