Madrid

Madrid Bull/Bear Territory

This study displays a background in four colors, lime, green, red, maroon, lime = Bull Territory, red = Bear Territory, green = possible reversal to Bear Territory, maroon = possible reversal to Bull Territory.
Trading with the basic rule, go long on a Bull Market and short a Bear Market.
This study can be used inside the main window, or by unmerging/merging it can be used as a standalone or in combination with other indicators.
The parameters defined by default reduce choppiness and false signals, but just like any other indicator, there is a trade off between fast response and choppiness. The smaller the parameters the faster response, but the more choppiness.
This indicator is built using three EMA's, two (the bigger ones) are used to define the trend direction, and the fastest one is used as a signal, when the signal breaks out the trend indicators to the downside we're in Bear Market, when the signal breaks out to the upside, we're in Bull Market, any thing in between is either a trend reversal or trend continuation.
Momentum indicators and price pattern analysis are recommended to determine the direction of the trend.

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?
// Hector R. Madrid : 24/JUN/2014 : 00:27 : 3.0 : Madrid Bull/Bear Territory
// This study displays a background in four colors, lime, green, red, maroon
// lime = Bull Territory
// red  = Bear Territory
// green = possible reversal to Bear Territory
// maroon = possible reversal to Bull Territory
//
study("Madrid Bull/Bear Territory", shorttitle="MBBT", overlay=true)
src = hl2

// Input parameters
fastMALength = input(34, minval=1, title="Fast Trend Length")
slowMALength = input(55, minval=1, title="Slow Trend Length")
refMALength = input(5, title="Signal MA Length")

refMA = ema(src, refMALength)
fastMA = ema(src, fastMALength )
slowMA = ema(src, slowMALength )

bullBearColor = refMA>fastMA and refMA>slowMA ? lime    // Bull
             : refMA<fastMA and refMA<slowMA ? red      // Bear
             : refMA>fastMA and refMA<slowMA ? maroon   // Possible Bull
             : refMA<fastMA and refMA>slowMA ? green    // Possible Bear
             : gray                                     // Data Error
             
bgcolor(bullBearColor, transp=75)