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
imokdesign Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
Inertia newlevel then multiplier=multiplier+1 oldlevel=newlevel newlevel=strategyprofit+startequi...
Inertia Hi Bjoern, I was playing around with your code this morning (EUR/USD 5'). Thank you to the...
victormork Hi, I would just like to share my own take on this strategy. I'm using 30 min on EURUSD but ...
mckubik Thanks. I will run a Test. 
poonsl2828 Hi! bjoern May i know what timing should i change for time zone (Singapore (GMT +8:00) ...
Samitha Prasanna Hi ALE, would you be able to provide the values for the below part of the code (time >=1...
Player Bonjour, J'ai testé cette stratégie sur EurUSD en 1 heures sur 10000 unités et le résultat ...
Player Vue du rapport du Backtest https://ibb.co/8BMrBz6
Doctrading Hello, Higher timeframes are better. I suggest D1 or H4.Best regards,
Pinkybouh hello, I propose to add another conditions: ie: haussier: close > open and close >...
TheHovisTrader I'd be interested in the actual profit of this - in the example the stop range is at least 2...
Dimi.A Awesome mate.
mora87 Hi David and Nicola, I'd like to share idea with you guys which is related to David's Idea. ...
Nicolas Please ask for custom coding in forums instead.
Naren Yanan what is    diplus  diminus  please
Barney Has anyone tested this algon now when PRT 10.3 was released?
Yngve does anyone know if the issue with the TP/SL is resolved ?
JakeDB Answered my own question....Sorry about this question. 5 positions, take profit at 15, loss ...
maxxb sto facendo girare in demo questa strategia modificata a 10 minuti con stop e profit ottimiz...
Manuel9z Hello, this strategy improves with the SL 30 and the TP 10. I have done backtesting and it w...
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.
Manu L. Et si je prends éventuellement celui-ci, comment puis je programmer le screener pour qu'il ...
Nicolas Pour des demandes personnalisées, merci d'utiliser le forum, en ouvrant un nouveau sujet tou...
Manu L. c fait :-) https://www.prorealcode.com/topic/pro-screeners-trend-reversal-continuation-pa...
Wilko This code is the work of a simple genius! Profitability lies in simplicity and repetition.
Nicolas Good joke. FYI, you'll find many identified recurring patterns there: http://paststat.com G...
Yngve i added a MA as a filter, that improved the equity curve quit nice actually
miguel33 Grazie filippo. sto facendo dei backtest per valutare meglio in diverse situazioni. se tro...
DerPat Hello, If you google, you will find a lot of articles and block posts that clearly show expe...
jens_kittner I would like to inform you that these strategies tested till today (03.05.2019) generates en...
Doctrading Hello,  The strategy should be improved, no doubt. But it was just one of my ideas, which h...
ALEALE Yes Nicolas is very difficult, macro economic data can destroy any work!!  
styrke depends which.. I personally think that it's much more easier to trade on XBTUSD, try to co...
raviesco Hello Nicolas, Thanks for the post. Do you have an updated version of this screener/indi...
GraHal Ooops got that excited I sent that last one twice! ha (and can't delete it, sorry) I got it...
Eric n = 3  dont forget to allow 3 contract in proorder
UkCoopDownUnder Tried EURUSD GMT and GMT -1, as far back as I can go, Nov 2018 on 15mn Tf, 22% loss
Doctrading Hello, Someone asked me something (his results seemed to be different) on my email, but it ...
Glen Marquis Not your best..So what is your best strategy? :)
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...
Benjamin Costa Ok thank you for your answers. Gianpiero, i have an Interactive brokers account. Noisette, i...
oldup It works on ProOrder - but  I don't like the maxWin = MaxLoss.    
oldup Just divise StopLoss /2 - Result is better  
Francesco78 does anyone still use this strategy? Seems like it doesnt work anymore
GraHal Hi Francesco78   doesn't work as in not great results? I was just going to give it another g...
GraHal Works good on the DAX @ 30 Sec TF over 100,000 bars ... maybe everything has speeded up by a...
verdi55 At least there should be some moving average that has also reverted into the opposite direct...
verdi55 In addition to the moving average, wait until at least one bar is completely back inside the...
rama This works excellent on range bound I tried , give 90% win rates on dax , 3 min chart. can s...

Top