Jump to content

Well, Tom Bombadil? Sing us a new song.


Recommended Posts

The following code is Pinescript (you can use it on tradingview.com).  It is the 'famous' 4-9-18 (E)MA crossover strategy.

Quote

//@version=4
strategy("3 MAcross_alert", shorttitle="MAcross_Alert", overlay=true)
EMA_Fast =input(4, minval=1) // To input period for 1st sma, default period set as 10
EMA_Medium =input(9, minval=1)
EMA_Slow =input(18, minval=1)
s1=ema(close,EMA_Fast) // sma values stored in s1 and s2 variables
s2=ema(close,EMA_Medium)
s3=ema(close,EMA_Slow)
plot(s1, color=#2196F3,linewidth=2) // Plots the MA
plot(s2, color=#FF9800,linewidth=2)
plot(s3, color=#9C27B0,linewidth=2)
long= crossover(s1,s2) and s2 > s3 // Define our buy/sell conditions, using pine inbuilt functions.
//long= close > s1 and s1 > s2 and s2 > s3
short= crossunder(s1,s2) and s1 < s2
//short= close < s1 and s1 < s2 and s2 < s3
//exitLong = crossunder(s1,s2)
exitLong= close < s3
exitShort = crossover(s1,s2) and s2 < s3
strategy.entry("long",strategy.long,when=long) // Buys when buy condition met
strategy.close("long",when=exitLong)
strategy.entry("short",strategy.short, when = short ) // Closes position when sell condition met
strategy.close("short",when=exitShort)

 

Try applying it to the various indices on a 15 minute time frame.

For example on the U.S. 30, 15 minute time frame, it gives this:

Net Profit
ALL
$ 2852.40
2.85 %
LONG
$ 3318.70
3.32 %
SHORT
$ 466.30
0.47

 

I did manage to tweak the exit conditions to get this to generate profit going short as well as long but I've forgotten what it was.  Otherwise you would only ever take long trades on this market.

The maximum drawdown was $ 2160.60

The real kicker though, is the equivalent buy and hold profit: $ 25609.35

Interestingly - if you apply it to other indices such as Australia 200 and French 30 the exact same system generates a pure loss (it makes profit on several others)  Hence, the same MAs on the same time frame do not generate results for different securities that are remotely similar.  (So much for the techniques of TA being applicable to everything.)

Link to comment
20 hours ago, dmedin said:

the same MAs on the same time frame do not generate results for different securities that are remotely similar

 

And there's nothing to suggest that these EMAs will keep on working on the DJIA into the future, either. 

So, we have made another discovery: the same TA approach, applied to different markets, different times, or the same market at different times, provides completely different results.  :D 

Link to comment

The search goes on though.  Why?

With buy and hold we typically have to buy an ETF.  There are plenty of S&P 500 ETFs, but few for indices like Nasdaq and Dow Jones.  (I found a good Nasdaq ETF, but it's about $500 for a single share.)

Also, we have no chance of profiting from shorting unless we buy short ETFs, which are probably more arcane and pointless even than spread betting.

Also, we have no exposure to FX or commodities if we buy and hold.  But then again, why should a fat smelly punter sitting at home in his underpants (like me) have 'access' to complex financial instruments in the first place :D 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • image.png

  • Posts

    • Hi @neueneuen Thanks for coming back to this, Please note that number 1 above has been confirmed, unfortunately, I don't have number 2 yet. We will keep you updated. Thanks, KoketsoIG
    • Just recently, I wrote an article about how a Solana blockchain art project (Artrade) is helping artists raise their earnings and even further transforming their physical works into RWA essentially NFTs. With that in mind, I came across Rarible, a marketplace that focuses on digital art and NFTs and the similarities of the platforms caught my attention. Rarible allows artists to sell their creations as NFTs, essentially digital certificates of ownership and cuts out middlemen, connecting artists directly with buyers. Beyond trading, Rarible offers a somewhat user-friendly interface for creating NFTs, even for beginners.   The platform unlike Artrade is built on the Ethereum blockchain and uses its own token, RARI, for governance and rewarding active users. In the long term they seem building with the goal of becoming a DAO in the future While it’s still early days, I have no doubt Rarible offers a unique approach to buying, selling, and creating digital art, and the recent listing on Bitget will further expose it to new communities and potential investors.     Do you think RARI's approach will be sustainable as a marketplace for NFTs?
    • Soybeans Elliott Wave Analysis  Function - Trend  Mode - Impulse  Structure - Impulse for (5)  Position - Wave 1 of (5) Direction - Wave 2 of (5) Details - Wave 1 of (5) completing with a diagonal. Wave 2 bounce is emerging before the price turns downside for 3 of (5). Invalidation now at 1226’6. Not much has changed since the last update.   Soybean Price Analysis: Elliott Wave Perspective Signals Continued Downward Trend   In the realm of commodity trading, Soybean has recently undergone a significant downturn, marking a nearly 7% drop since March 21st. This decline appears to be part of a broader trend that commenced back in June 2022. However, before this recent descent, there was a brief period of respite characterized by a corrective bounce starting in late February.    Delving deeper into the price action, an Elliott Wave analysis sheds light on the intricacies of Soybean's movement. The daily chart's decline since June 2022 reveals a corrective pattern, delineated into waves A-B-C, as denoted by blue annotations.   The initial wave, labeled as Blue Wave 'A', terminated at 1249 in October 2023, exhibiting a distinct diagonal pattern. Subsequently, a modest rebound ensued, marked by Blue Wave 'B', which concluded at 1398 in November 2023. However, the ascendancy was short-lived as the bears regained control, manifesting in the ongoing development of Blue Wave 'C'. This wave, evolving into an impulse wave, has currently progressed to wave (5) following the completion of wave (4) in March 2024.   Zooming in on the H4 chart, a granular analysis reveals the sub-waves of wave (5). Wave 1 of (5) concluded with a diagonal structure, followed by a corrective phase as the price undergoes a temporary upside correction to complete wave 2. Despite uncertainties regarding whether wave 2 has fully concluded or will undergo another upward leg, the overarching trajectory remains clear – a downward break is anticipated to continue wave 3 of (5), leading to further downside movement.   In light of this analysis, the prevailing sentiment favors sellers, who continue to assert dominance over the commodity market. As long as the price remains below 1226’6, the outlook remains skewed towards further downside potential, with the possibility of reaching the lowest price point since November 2020.   In conclusion, the Elliott Wave perspective offers valuable insights into Soybean's price dynamics, signaling a continued bearish trajectory in the near term. While short-term fluctuations may occur, the broader trend suggests that sellers are likely to maintain control, shaping the commodity's price action in the foreseeable future.   Technical Analyst : Sanmi Adeagbo   Source : Tradinglounge.com get trial here!        
×
×
  • Create New...
us