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

    • I know    maybe I have not been clear, at 14:30 when the US market is open I still cannot but these ETF - no matter what.
    • NVDA Elliott Wave Analysis Trading Lounge Daily Chart, NVIDIA Corp., (NVDA) Daily Chart NVDA Elliott Wave Technical Analysis FUNCTION: Counter Trend MODE: Corrective STRUCTURE: ZigZag POSITION: Intermediate wave (A).   DIRECTION: Downside in wave 3.   DETAILS: We are looking at either a significant top in place in wave (5), or else we could be continuing higher, after a clear three wave move to the downside, leaving us with one more leg lower to come before upside resumption.       NVDA Elliott Wave Analysis Trading Lounge 4Hr Chart, NVIDIA Corp., (NVDA) 4Hr Chart  NVDA Elliott Wave Technical Analysis FUNCTION: Counter Trend  MODE: Corrective  STRUCTURE: ZigZag  POSITION: Wave 3 of (A).   DIRECTION: Downside in wave 3.   DETAILS: Looking for acceleration lower into wave 3, as we failed to find support on top of MG1, looking for 100$ as next downside target.       Welcome to our latest Elliott Wave analysis for NVIDIA Corp. (NVDA). This analysis provides an in-depth look at NVDA's price movements using the Elliott Wave Theory, helping traders identify potential opportunities based on current trends and market structure. We will cover insights from both the daily and 4-hour charts to offer a comprehensive perspective on NVDA's market behavior. * NVDA Elliott Wave Technical Analysis – Daily Chart*  The daily chart suggests that NVDA might have reached a significant top in wave (5). However, there is a possibility that the market could resume higher after completing a clear three-wave move to the downside. This implies that we might see one more leg lower before an upside resumption. Traders should be prepared for continued downside pressure in wave 3.   * NVDA Elliott Wave Technical Analysis – 4Hr Chart*  The 4-hour chart indicates that NVDA failed to find support on top of MG1 and is now looking for acceleration lower into wave 3. The next downside target is around $100, which traders should monitor closely for potential support.   Technical Analyst : Alessio Barretta Source : Tradinglounge.com get trial here!  
    • Dear @Bradipo, The above are not all session stocks, the market opens at 14:30. Thanks, KoketsoIG
×
×
  • Create New...
us