Finding the "Holy Grail" in the crystal ball?

Good day,

I have’t actually started trading forex yet, but am looking into it to supplement stock trading. Using the tradingview site. I’ve found a SMA crossover Pine script that promises interesting results. However, and here’s where the “crystal ball” is still quite murky, applying the strategy on the same currency pair over various time frames yields wildly varying results.

As I write this, right now on the NZDUSD, I get the following results:

1 Minute $427.85 net profit on 31 completed trades
3 Minute $1386.51 on 10 trades
5 minute $987.16 on 14
15 minute -$150.09 on 23
30 minute -$787.62 on 31
1 hour -$581.11 on 45
2 hour $ 19.62 on 15
4 hour $191.46 on 16
1 Day $873.82 on 24

So clearly, right now at least the “sweet spot” is at the 3 minute time frame. But how does one select such in advance, as these strategy tests are looking at the past? And as the disclaimer goes, “past performance is no guarantee of future performance, and all results are subject to change without notice.”

I suppose if one were to attempt to automate such a thing, a “robot” would have to run the strategy each time against all the time frames and adjust the placement of the order to the time frame that is returning the highest potential return. That trade ends, repeat process so that you are always trading into the most profitable return. Repeat test each time a trade is concluded. Anybody know if such a software to do this type of thing exists? Or know of a platform upon which this could be tested to see if it will actually perform as defined?

I’m probably looking at this WAY too simplistically, if this is the proverbial “Holy Grail,” thank me and let me in on it, will you please? :smile:

Any thoughts appreciated.

Welcome to the forum.

Wow - this one could have been written by me. But you are ahead of me. You have found a Pinescript script to test. I have not got that far. But I may be able to help you to put your discovery into context.

Question: Is it necessary to find a strategy that returns maximum profit, or is it better to find one that returns consistent, if not maximum profits? I have been in Forex nearly 15 years and have not managed yet to demonstrate a trading edge. This time around (since last year) I have set myself a task to have a seriously considered strategy and plan. The decision path has gone like this, to date:

Will I participate in Forex in the future? Yes
Do I have clearly defined and SMART goals and objectives? Specific, measurable, achievable, relevant, time-bound? Yes
Do I have a strategy defined to achieve my objectives? Strategy defines what and why.
Do I have a plan defined that will operationally deliver my strategy? Plan is the what, who, where and how. Yes, but incomplete.
What is complete?
Strategy. I will follow the NNFX method and approach to Forex trading.
What timeframe(s) will my plan include? Daily only.
Which pairs will my strategy include? All 28 most common pairs.
Have I defined the six steps of my detailed trading lifecycle plan? Yes
Step 1 - have I quantified my risk per trade and do I have a method of calculating how many PIPs of risk that equates to? Yes - by using the ATR(14) times 1.5 as a loss.
Step 2 - etc, you get the picture.

So from a selfish point of view I would wish you to just run the backtesting on the daily, for all 28 pairs and then see what the variance is between results. If you have been able to run the Pinescript on the NZDUSD you should be able to run it without too much additional coding on all 28 pairs.

Please maintain this post. I have a very high level of interest in anyone who is more productive than me when it comes to automating things. I should have done some Pinescript study by now, but I have been sidetracked by doing some cryptocurrency mining in the meantime - all of course with the same end objective in mind.

Thanks for your reply. I haven’t actually gotten to the trading part (yet). Just trying to approach the whole idea in a systematic way. With all the hype on YouTube and elsewhere, trying to get a sense of how much is really possible, and how much is exaggerated or leaning on presenting only the most favorable results.

Working my way through the big green education button to get more familiar overall. I suppose the “strategy” I’m looking at is taking the sma crossover and then optimizing it to find the most productive time interval. Checking on the same NZDUSD pair later, I found that the “sweet spot” had moved from the 3 minute chart to the 5 minute chart. So this is where the recursive testing would come in as future trades are determined.

Not sure if Pinescript would allow such to be modeled, I may need something more robust for that. Meanwhile the script I found can be gotten here: Hmm, as new users are apparently unable to post direct links I’ll break it down into pieces and maybe it will let that go through. String all the lines below together with the forward slash and a dot before the net in the first line in between and it should get you there.

kodifynet

tradingview

strategies

dual-moving-average

#performance-of-dual-moving-average-tradingview-strategy

Be seeing you.

1 Like