320 views
31
320 3
EXPERIMENTAL: test study on trend flow dinamics.
Remove from Favorite Scripts Add to Favorite Scripts
//  ||-----------------------------------------------------------------------------------------------------||
study("[RS]GB", overlay=true)
//  ||-----------------------------------------------------------------------------------------------------||
//  ||---   Step 1 : Section Size.  -----------------------------------------------------------------------||
sectionsize = (syminfo.mintick*10) * input(100)
sectionfraction = sectionsize * 0.01
//  ||-----------------------------------------------------------------------------------------------------||
//  ||---   Step 2 : Trend  -------------------------------------------------------------------------------||
trend = ema(ema(ohlc4, input(120)), input(24))
rangedetection = input(24)
trenddirection = rising(trend, rangedetection) and rising(trend, 1) ? 1 :
        falling(trend, rangedetection) and falling(trend, 1) ? -1 : 0
//  ||---    1 = UP TREND
//  ||---   -1 = DOWN TREND
//  ||---    0 = RANGE ::: need better way to define it!!
//  ||---
testc = trenddirection == 1 ? green : trenddirection == -1 ? maroon : gray
plot(trend, color=testc, linewidth=3)
plot(trend+sectionsize, color=green)
plot(trend+sectionsize*2, color=green)
plot(trend+sectionsize*3, color=green)
plot(trend+sectionsize*4, color=green)
plot(trend+sectionsize*5, color=green)
plot(trend-sectionsize, color=maroon)
plot(trend-sectionsize*2, color=maroon)
plot(trend-sectionsize*3, color=maroon)
plot(trend-sectionsize*4, color=maroon)
plot(trend-sectionsize*5, color=maroon)
//  ||---
//  ||-----------------------------------------------------------------------------------------------------||
//  ||---   Step 3 : Average Trend Angle  -----------------------------------------------------------------||
countertrend = trend - change(trend, input(120))
plot(countertrend, color=black, linewidth=3)
plot(countertrend+sectionsize, color=lime)
plot(countertrend+sectionsize*2, color=lime)
plot(countertrend+sectionsize*3, color=lime)
plot(countertrend+sectionsize*4, color=lime)
plot(countertrend+sectionsize*5, color=lime)
plot(countertrend-sectionsize, color=red)
plot(countertrend-sectionsize*2, color=red)
plot(countertrend-sectionsize*3, color=red)
plot(countertrend-sectionsize*4, color=red)
plot(countertrend-sectionsize*5, color=red)
//  ||-----------------------------------------------------------------------------------------------------||
//  ||-----------------------------------------------------------------------------------------------------||
//  ||-----------------------------------------------------------------------------------------------------||
How does it work? Can you explain what is based on? It is very interesting.

Thanks
Reply
RicardoSantos DavidTrades
its calculating a counter trend line from the inverse change ma, was just for studying purposes and i didnt went much further with it... thus the 'EXPERIMENTAL' note :p
Reply
DavidTrades RicardoSantos
I halved all of the parameters that were in default, works very well and adds a lot of information to the price action.
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar Shows How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out