NexusFi: Find Your Edge


Home Menu

 





Who can code this Block Moving Average for Sierra charts


Discussion in Sierra Chart

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




 
Search this Thread

Who can code this Block Moving Average for Sierra charts

  #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?
How to apply profiles
Traders Hideout
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
 
  #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:	242
Size:	154.9 KB
ID:	249321  
Reply With Quote
Thanked by:




Last Updated on May 5, 2018


© 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