A “harami” trading strategy code for Daily EUR/USD

A “harami” trading strategy code for Daily EUR/USD

I originally found this code on internet.

To go “long” : when meeting a Harami with a black (or red) candle above the 50 days moving average, we buy the next day at the opening.

We close days later, no matter what happens !

The procedure is the opposite for the “short” trades.

The strategy is profitable on EUR/USD.

WARNING :

The test exclude Sunday candles (included in Mondays).

If you view the candle of  Sunday (from 23H to 00H), then the test will be completely distorted !

This code is certainly not a panacea, but it deserves to be refined and improved, no doubt.

 

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. gutta11 • 04/13/2016 #

    Hi!Why do I get a result which is -92% and only one trade in daily?
    What do you think is wrong?

  2. Doctrading • 04/13/2016 #

    Hello,
    Strange.
    Use it on EUR/USD, with NO CANDLE on Sunday.
    I use prorealtime.com (free daily data).

  3. gutta11 • 04/13/2016 #

    Okey thank you. How do I set “NO CANDLE on Sunday” ?

  4. Doctrading • 04/13/2016 #

    It depends of your broker.
    Or you can use the command “dayofweek”

  5. Doctrading • 04/13/2016 #

    Maybe you can also change the hourly beginning of the day (not 23PM but 12AM, OOH in french). It must be possible.

  6. Duccio • 04/13/2016 #

    Hi Doctrading,there is a way to control the max loss of the positions in this code?
    For example, if I wanted that the positions do not lose more than 200 euro what kind of code I cat try?
    Thank you

  7. Doctrading • 04/13/2016 #

    Hello,
    Yes, there is a command I think, but I don’t know it. Nicolas knows it.
    You can also use less leverage.Best regards,

avatar
Register or

Likes

avatar avatar avatar avatar
Related users ' posts
Doctrading Bonjour, Tu as raison, il faut faire attention à la fiabilité de certains backtests. Le pro...
Duccio Hi DocTrading, I've backtested your strategy and I notice that 75% of position have been cl...
Doctrading Hello,  No, I don't use this strategy on real account, because my own strategies (that you ...
komiko 9a marche pas ? le code sur prorealtime "erreur de syntaxe l'instruction retur et autorisée ...
Nicolas En effet, il s'agit bien du code d'un indicateur et non d'un screener ou d'une stratégie de ...
RussJ Hey people Some great screeners on here but I'm pulling up too many stocks when I s...
Doctrading Defparam cumulateorders = false n=1 // Plus le "ratio" monte, moins il y a de positions ...
Malloc Bonjour :) Je sais que cette stratégie a été partagée il y a de ça plusieurs années mais ...
lilo789 Hi guys! Do you know if it is possible to set the buy size to a relative % of the available...
luigiR Hallo doc, thank again for your strategy but can you suggest me  an example of the optimizat...
Wilko Do NOT take this system live! The backtest results will never be repeated live due to a shor...
mrripley99 So I've played around with this just recently and have achieved some good results in an IG d...
Pierreee That a realy great strategy !!!  It's realy profitable in daily trade. I'm gonna put some ...
entony hello timeframe on what works best and how couples ??grazie
111111dw i am running this on the cac 5m time frame but the results are very different from the backt...
Doctrading Hello fesxeurex, It can display both : when it is in formation, and when it has been formed...
the_giorgio Bonjour Doc, Je crois que votre définition du harami est erronée Critères du Harami D...
dfl3tch3r Great screener...Has anyone got code for trade/backtest the next bar breakout (short or long...

Top