Stochastic Gold Trader

Stochastic Gold Trader

I have been trading Gold more than usual recently and made an interesting observation regarding the trend waves moving very much in sync with the stochastic. So this prickled my curiosity enough to quickly code-up a strategy based on my observation. And despite the fact that I purposefully fine tuned (aka curve fitted) the stochastic parameters I still think the result is rather promising considering there really isn’t that many essential moving parts outside of the stochastic settings. Also as a professional PRT developer I no longer have the liberty of sharing as many strategies to the community as before, so I sincerely hope there is something that someone here might find useful.

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. avatar
    Anonymous • 08/14/2020 #

    Hi Juanj,
    Thank you very much for sharing, at first glance this looks great. I look forward to testing further!
    Thanks

  2. Gaspare • 08/14/2020 #

    Ottimo TS grazie Juanj
    Si puo’ adattare anche agli indici? Magari ci puoi suggerire qualche dritta per il mini SP500?
    Grazie

  3. pranik • 08/14/2020 #

    Hi juanj, I don’t undestand line 39 on the uploaded code. There is a stoch -1 on the if statement. Maybe you wanted to write stoch = -1.
    Thanks

  4. juanj • 08/14/2020 #

    @Pranik that is exactly what I did? Line 39 looks at stoch = -1 and line 45 looks at stoch = 1

  5. juanj • 08/14/2020 #

    The ‘=’ sign probably got lost during the copy/paste. It is always better to rather import the ITF file to avoid these formatting issues.

  6. bertrandpinoy • 08/14/2020 #

    hi Juanj, thank you. TF 1 h?

  7. pranik • 08/14/2020 #

    Hi @Juanj, I imported itf file and the ‘=’ sign is missing. If I put stoch = -1 as you suggest the results are very different from yours. If I remove ‘=’ sign the results are the same.
    Thanks

  8. Poiloulou • 08/14/2020 #

    The question is how the program understand “Stoch -1”. Because if we remove it, or if we put Stoch = -1 it is not working at all.

  9. pranik • 08/14/2020 #

    If stoch -1 then
    is equivalent to
    if stoch -1 <> 0 then

  10. Gaspare • 08/14/2020 #

    io l’ho messo live e qualcosa non va: apre posizioni short, in accordo con lo stocastico che punta al ribasso, mentre sul backtest apre posizioni long.
    Per adesso sono posizioni positive

  11. Gaspare • 08/14/2020 #

    ho inserito una loss di -25 e un profit di +50 per cui dopo l’ottimizzazione i parametri dello stocastico sono 22 5 4

  12. juanj • 08/14/2020 #

    Just be careful, this strategy has not been tested live

  13. delynot • 08/14/2020 #

    Superbe stratégie, elle marche plutôt bien en H1 et H4. Merci 😉

  14. avatar
    Anonymous • 08/14/2020 #

    Hi – I’ve had a lot of fun testing this out, and trying various iterations and tweaks. Thank you once again for sharing. A nice little strategy in an asset class I don’t currently trade. A useful stop loss mechanism is what I am currently looking to incorporate, along with the ability to exit the market if the direction changes to that of the current trade. Will share when I have something that works.
    Thanks once again, and keep posting!

    • Lespa212 • 08/14/2020 #

      Hi Samsampop,
      are you using this strategy? did you add a SL and an exit in case of a trend reversal? I will be happy to see any improved version of this nice starting point .
      Thank you.

  15. Jan • 08/14/2020 #

    This strategy is more than 90% in the market, do you reckon overnight interest costs in your strategy ?

  16. juanj • 08/14/2020 #

    Hi Jan, I did not include swap fees for this strategy as it is primarily a ‘concept strategy’. I do not personally trade this strategy live neither do I intend to,

  17. jebus89 • 08/14/2020 #

    heres a pic of 200K bars: https://imgur.com/JNKCJ6u

  18. bibiyanki • 08/14/2020 #

    doesn’t work , not start

  19. philnunn14 • 08/14/2020 #

    hi!
    Can you confirm which gold market, Minutes and units?
    On pro real time?

  20. Jan • 08/14/2020 #

    Thanks for sharing ! I tested it on the hourly graph, it gives very good profits, but also huge drawndowns. I tried a percentage stoploss, that reduces losses per trade, but that also reduces overall profit and % winners significantly.

    • annepfw • 08/14/2020 #

      Hello Jan, i like to have your little programm of stoploss. thank

  21. LaurentBZH35 • 08/14/2020 #

    It certainly need an other filter to run less time than 90% on market.
    Any suggestion ?

  22. CLAUDIOZ8 • 08/14/2020 #

    Hi Juanj, thank’s. good work.

  23. jissey • 08/14/2020 #

    Bonjour Juanj , avez-vous un programme qui tourne en réel depuis au moins une année et avez-vous fait un backtest pour comparer les résultats ? Pour moi, je trouve qu’il y a des différences entre un backtest et la démo et encore une différence entre la démo et le réel, avez-vous constaté cela? Merci pour votre réponse, cordialement, jc

  24. jissey • 08/14/2020 #

    bonjour Juanj , avez-vous un programme qui tourne en réel depuis plus d’un an et comprer les résultats avec un backtest ? Merci pour votre réponse, cordialement

  25. juanj • 08/14/2020 #

    Hi Jissey, your observation is correct. There are most certainly differences between the backtest, demo and live. Please see the screenshots attached to my 2 strategies listed in the marketplace. They contain live results. Sometimes I update strategies after a few months meaning it is rare that I run the same version unchanged for a year.

  26. superfalcio • 08/14/2020 #

    Hello, on the 2h timeframe I got a better performance in terms of win% and profit factor. I just optimized some parameters of stochastic.

  27. Jiankyr82 • 08/14/2020 #

    Juan thanks for sharing, I had played with it few days, as also try to catch up on my pro-real-time coding skills. Your codes are always great training. The philosophy’ of this strategy for gold is impressive good- that I noticed is the strategy is very effective on upside gold waves when gold goes up while work terribly on downsize waves. That I try to add if a supper trend flag – till now tried couple. I believe even if the simple pro-real-time super trend(3-10) may work, if solve it I will share it with you.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+27 more likes

Related users ' posts
DonDollar Ni Nicolas, thanks for the comment. I started with a 3000$ Position and 1 Pip Spread. I fo...
DonDollar Stupid me, it is indeed 1 POINT Spread....  
HarryPro Hello Clemens, I tested your Friday XAU and found it broke down when going well into the pas...
Etienne Hi, I'm quite late in this thread. I'd just like to propose an enhancement because this in...
Nicolas Thanks Etienne.
Bard Hi Nicolas, I wanted to make this scaled indicator above between -1 and +1 instead of 0 to +...
Madrosat Bonjour Nicolas Je souhaiterais faire colorier le fond du graphique supérieur en vert lorsq...
Nicolas Merci d'ouvrir un sujet dans le forum approprié.
Nwab Hello Mr Nicolas.. Please how can I set this up as an indicator to work on mt5. Your guidan...
MikeGC I don't know if you have used the variables a and b to optimise the parameters for the Super...
gianpiero75 I have not optimized, I multiplied the parameters for 6 (5,8), to use them on the 4  hoursTF...
bertrandpinoy bonjour Mike j utilise TrendChaser V2.0 et quand il prend position cela ne programme pas le ...
Doctrading Hello, As I said, I didn't use spread for the screenshot as I don't trade Gold and I don't ...
smurfy Hi, I had been losing on gold and after I manually go through the 5min chart using IG and w...
eiffel Hi Smurfy, hope you are still there... I would like to help you to write and test the code.
s00071609 Hi, could you please suggest, what this codes gives, lowest[b](rsi[a]) -- just trying to us...
Nicolas lowest[b](rsi[a]) returns the lowest values of the RSI of "a" periods, over the last "b" per...
s00071609 Hi, what would be the code to get the price for last bullish DTOSC cross over. I am looking ...
Doctrading I forgot to write at the beginning :  a = 50 b = 50 These are intermediate levels Sorry
DerPat Thank you. This one could be an aid in my current research on stochastics.
Pelayo it is possible that in line 12 we should put seuilinf=-b, thaks for all
Doctrading It works on ProRealTime CFD, but backtest begins since May 2014
alex224 Hola Andres, buen trabajo. Algun problema por usar la estrategia con acciones en time frame ...
Andres Hola Alex, no lo he probado en otros timeframes, pero con esta configuración específica no c...
Nicolas
8 years ago
lokbuscas Or in weekly??
Nicolas I don't know, you should make your own studies.
lokbuscas Ok thanks Nico
Nicolas
8 years ago
Vinks_o_7 great, thanks Nicolas !
Vinks_o_7 argh...still nothing even with 10 000 bars on daily or hourly basis...
Vinks_o_7 ok now : had to refresh the indicator.

Top