NexusFi: Find Your Edge


Home Menu

 





Who can code this Block Moving Average for Sierra charts


Discussion in Sierra Chart

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




 
Search this Thread
  #1 (permalink)
Nicolaas
Utrecht+Utrecht/ The netherlands
 
Posts: 11 since Apr 2015
Thanks Given: 7
Thanks Received: 12

Hi,

I really like this indicator, it is called stepup, others call it block-moving average.
It can keep you in a trend for a longer time then with normal moving averages, if you use a longer and a shorter time, it gets you great entries.

Who can code this Block Moving Average for Sierra charts? Or has somebody coded this already for Sierra charts?

There are many different versions, I just attached one of them for reference.
The picture shows the indy with settings (0,0,34,50,2,1,0,1,0) on a 5m EURUSD chart.

Thanks a lot! Regards,

Nicolaas


Attached Files
Elite Membership required to download: stepma_v9_nmc.mq4
Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
Roland Garros Final Day: $3M on Zverev at 80.5% -- Leban …
Prediction Markets & Event Contracts
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
 
  #3 (permalink)
Nicolaas
Utrecht+Utrecht/ The netherlands
 
Posts: 11 since Apr 2015
Thanks Given: 7
Thanks Received: 12


I do have a more simplified Stepup moving average or Block moving average code in easylanguage, this has about the same output. Maybe this one is easier to convert for Sierra Charts?

The code:

{=== StepUp Moving Average OR Block Moving Average =============}
Inputs: SU_ATR_Length ( 2000 ),
SU_ATR_BoxMultiplyer_1 ( 8 ),
SU_ATR_BoxMultiplyer_2 ( 13 );

Vars: SU_DIR1(0), SU_WorkBoxHalf1(0), SU_Midl1(0), SU_Bot1(0), SU_Top1(0),
SU_DIR2(0), SU_WorkBoxHalf2(0), SU_Midl2(0), SU_Bot2(0), SU_Top2(0) ;

SU_WorkBoxHalf1 = ( SU_ATR_BoxMultiplyer_1 * AvgTrueRange( SU_ATR_Length ) * 0.5 ) ;

If H > SU_Top1 then begin
SU_DIR1 = 1 ;
SU_Top1 = H ;
SU_Midl1 = SU_Top1 - SU_WorkBoxHalf1 ;
SU_Bot1 = SU_Top1 - ( 2 * SU_WorkBoxHalf1 ) ;
End else
If L < SU_Bot1 then begin
SU_DIR1 = -1 ;
SU_Bot1 = L ;
SU_Midl1 = SU_Bot1 + SU_WorkBoxHalf1 ;
SU_Top1 = SU_Bot1 + ( 2 * SU_WorkBoxHalf1 ) ;
end ;

SU_WorkBoxHalf2 = ( SU_ATR_BoxMultiplyer_2 * AvgTrueRange( SU_ATR_Length ) * 0.5 ) ;


If H > SU_Top2 then begin
SU_DIR2 = 1 ;
SU_Top2 = H ;
SU_Midl2 = SU_Top2 - SU_WorkBoxHalf2 ;
SU_Bot2 = SU_Top2 - ( 2 * SU_WorkBoxHalf2 ) ;
End else
If L < SU_Bot2 then begin
SU_DIR2 = -1 ;
SU_Bot2 = L ;
SU_Midl2 = SU_Bot2 + SU_WorkBoxHalf2 ;
SU_Top2 = SU_Bot2 + ( 2 * SU_WorkBoxHalf2 ) ;
end ;

{ ================ Print ======================================}
vars: SU_mid_C1(0), SU_mid_C2(0);

If SU_DIR1 = 1 then SU_mid_C1 = cyan else SU_mid_C1 = magenta ;
plot1 ( SU_Midl1, " SU_Midl1 " , SU_mid_C1 ) ;

If SU_DIR2 = 1 then SU_mid_C2 = cyan else SU_mid_C2 = magenta ;
plot2 ( SU_Midl2, " SU_Midl2 ", SU_mid_C2 ) ;


Attached Thumbnails
Click image for larger version

Name:	Easylanguage Block Moving average code.PNG
Views:	331
Size:	154.9 KB
ID:	249321  
Reply With Quote
Thanked by:




Last Updated on May 5, 2018


© 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