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

    • The BLUM project has recently gained attention in the cryptocurrency community due to several developments such as  Introduction of a mining game on the TON ecosystem, allowing users to earn $BLUM tokens.  Announcement of new strategic partnerships Upcoming features including Tribes and Memepad functionalities.  Active community engagement through events and rewards 5. Recognition from notable figures in the crypto space Key upcoming events: Token Generation Event (TGE) for the BLUM mining game scheduled for September 20, 2024 Coinciding airdrop of BLUM tokens to the community The project plans to provide liquidity on centralized exchanges such as Bitget and Binance, as well as decentralized exchanges like Uniswap, Curve, and PancakeSwap. These developments have contributed to increased discussions about BLUM on social media platforms, particularly Twitter. As the crypto landscape evolves rapidly, interested individuals are encouraged to stay informed about BLUM's progress through official channels and related TON communities like r/TONDiscussion.  As with any cryptocurrency project, potential participants should conduct thorough research and consider their own risk tolerance before engaging.
    • Counter Fire is poised to redefine the gaming industry with its innovative blend of competitive gameplay and blockchain technology. The game offers multiple modes, including team-based matches of quads, duos, and solos along with solo missions, with deep customization options and dynamic battle scenarios. While the core gameplay of Counter Fire is similar to PUBG, a battle-royal where the last-man or last-team standing wins in a survival gameplay, users earn while playing Counter Fires. The project has been buzzing the ecosystem as the airdrop claim went live today so users can claim their $CEC and await listing on 9th Sept. While gamers continue to claim their tokens, some analysts have start speculating that the project will redefine the gaming landscape citing the project partnership with likes of YoubiCapital, HASHKEY, KERNEL ventures and many more and the fact that the project raised over $5 million as the base for their argument. The project partnership with Bitget could also be a reason it continues to gain such exposure as players can only claim their token to the exchange. Though, as players claim their token to the exchange, they could benefit some reward from the 1 million $CEC reward pool. I still think many exchanges should list the token so gamers can have many choices.
    • Hi @feirb1, Thank you for your post. Please note that we offer T-Bills for trading on leveraged accounts. By trading these, you will be speculating on the price movements. This means that, when trading, you´ll never take ownership of an actual t-bill. Instead, you´ll take a position on the market either rising in value or falling. Thanks, KoketsoIG
×
×
  • Create New...
us