Buy if the price has fallen

Buy if the price has fallen

We buy when the price is below the EMA200 and above the EMA50 (sik!).
As a filter we use a simple linear regression slope.
We sell when the price is above the EMA28 and below the EMA7.

It really couldn’t be easier

thats all for today
until then

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. Richk87 • 02/15/2022 #

    Hi John, I like the code a lot, but i can only get it to work cumulateorders in backtesting. It doesn’t do it in live situation. Any reason why?
    Many thanks
    Rich

  2. Desastrader • 02/15/2022 #

    Da error en la linea 9 🙁

  3. JohnScher • 02/15/2022 #

    If you import the itf.file the code works very well, with a big loss at the end based to the attack of Russia on Ukraine

  4. adconsulting • 02/15/2022 #

    Ciao John. grazie per la condivisione. Sul DAX A 4 H HO FATTO PICCOLE MODIFICHE E RISULTATI SONO OTTIMI ANCHE CON NOTIZIE NEGATIVE COME LA GUERRA IN UCRAINA, TI COPIO DI SEGUITO IL CODICE:

    defparam cumulateorders = true // false is working well

    once ordersize = 1

    TradingDay = ((dayofweek=1 and (time=050000 or time=090000 or time=130000 or time=170000)) or (dayofweek=2 and (time=010000 or time=050000 or time=130000 or time=170000)) or (dayofweek=3 and (time=090000 or time=130000 or time=210000)) or (dayofweek=4 and time=050000) or (dayofweek=5 and (time=010000 or time=090000 or time=130000 or time=170000)))
    //TradingTime = time >= 090000 and time Exponentialaverage [45] (close)
    c2 = close close [1]
    c4 = LinearRegressionSlope[95] (close) < 0

    IF TradingDay then
    If c1 and c2 and c3 and c4 then
    buy ordersize contract at market
    Endif
    ENDIF

    c5 = close Exponentialaverage [21] (close)

    IF longonmarket then
    If c5 and c6 then
    sell at market
    Endif
    Endif

    Set Stop %Loss 5.50 //as insurance
    Set Target %profit 2.75

    //*****************************************************************
    if close>open then
    marginebv=low-130
    elsif close<open then
    marginebv= low-115
    endif
    //tp=300
    //stopbv=200
    //acquistobreck= LOW-margine
    //acquistobv= close -marginebv

    if longonmarket then
    sell at marginebv stop
    endif

  5. adconsulting • 02/15/2022 #

    SCUSA . ECCO IL CODICE
    defparam cumulateorders = true // false is working well

    once ordersize = 1

    TradingDay = ((dayofweek=1 and (time=050000 or time=090000 or time=130000 or time=170000)) or (dayofweek=2 and (time=010000 or time=050000 or time=130000 or time=170000)) or (dayofweek=3 and (time=090000 or time=130000 or time=210000)) or (dayofweek=4 and time=050000) or (dayofweek=5 and (time=010000 or time=090000 or time=130000 or time=170000)))
    //TradingTime = time >= 090000 and time <= 170000

    c1 = close > Exponentialaverage [45] (close)
    c2 = close < Exponentialaverage [100] (close)
    c3 = close > close [1]
    c4 = LinearRegressionSlope[95] (close) < 0

    IF TradingDay then
    If c1 and c2 and c3 and c4 then
    buy ordersize contract at market
    Endif
    ENDIF

    c5 = close < Exponentialaverage [9] (close)
    c6 = close > Exponentialaverage [21] (close)

    IF longonmarket then
    If c5 and c6 then
    sell at market
    Endif
    Endif

    Set Stop %Loss 5.50 //as insurance
    Set Target %profit 2.75

    //*****************************************************************
    if close>open then
    marginebv=low-130
    elsif close<open then
    marginebv= low-115
    endif
    //tp=300
    //stopbv=200
    //acquistobreck= LOW-margine
    //acquistobv= close -marginebv

    if longonmarket then
    sell at marginebv stop
    endif

  6. wally • 02/15/2022 #

    Hola soy nuevo en el mudo robots. Alguien seria tan amable de poner el archivo itf.file ya que sin él no sé como poner el código en el PRT. GRACIAS!!

  7. Darren Nash • 02/15/2022 #

    I found this works well on the DOW

  8. thomas2004ch • 02/15/2022 #

    Hi John,

    Is your strategy suitable for daily SPY?

    Regards

  9. gatowman • 319 days ago #

    Hi, ich bin leider Anfänger, habe den Code zwar importiert, aber scheinbar läuft er nicht auf D1, was muss ich ändern, oder kann jemand den code auf D1 oder W1 umschreiben, danke.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Bougnat bonjour, ton screener semble intéressant .... merci pour le partage
guytrc Hi Nicolas - many thanks for your screener. One question if I may - how does condition 5 wor...
Nicolas In the last 20 periods, the SMA 10 periods was above the SMA 20 periods.
stratobast Good afternoon everyone. Thanks Doctrading for your work. I have an issue while using this ...
stratobast My bad guys. I understood what was the problem. The indicator uses highs and lows for the Re...
samwarduk Has anyone tried this on Bitcoin GBP1? The results look amazing but every time mine trie...
Kris75 Hi Gabri I launched a very simple strategy based on the 3 bars trailing stop that you cre...
TimDeCat Hi. Has anyone coded a version that you could alter it to say 5 bar trailing stop? ie make ...
Nicolas Please open a new topic in forums so we can code it there, thanks.
finplus bonjour, il y a un problème à la fin du code avec elsif (close 0 then ... ne manque t il pas...
kj1988 Hello Nicolas, thank you for this useful indicator. Could you tell me how I can remove the...
Nicolas remove lines 101 to 103
GraHal Yes sorry, I set up a link to a screen shot on my google drive and then I got locked into th...
gabri Here's the thread https://www.prorealcode.com/topic/multiframe-rsi-of-rsi/
Bernard13 Bonjour Nicolas, Pourriez-vous m'indiquer si cet indicateur fonctionne avec la V11 ? Le di...
gackeen Scusa Pier, scusate tutti, sono nuovo. Ho caricato il file e mi viene restituito il messaggi...
JR1976 HI Nicolas , I tried to copy paste but not import directly and the code works well I hav...
mcosta This code doesn't work on 10.3 platform(IG), neither with copy/paste nor with itf import, an...
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
ET I agree with verdi55. As it is now, the code will only test for a breakout on the upside (li...
Philipjonasson are u still active Wing?
jens_kittner This strategy was posted 2 years ago. I tested it today and it works perfect with the new da...
giustim Hallo I am not able to use it on daily TF What have I to change? Thanks a lot
pac.ros Ciao Francesco, ti scrivo per un aiuto a proposito della strategia di Hofmann che anch'io ho...
Nicolas Thanks for sharing your automated trading strategy idea. Even if you accumulate loosing orde...
Maz Ok. Potential here to build onto this. Have opened a forum thread for further discussion: h...
David Balance thanks for sharing this excellent indicator.  Here are some thoughts.  please ad...
ALE
8 years ago
CSR strategy DAX 1 D
CSR strategy DAX 1 D
17
Strategies
Jesper I tried it on dax 1D and I did not get any trades. Shifted to 10H and it started working. Wo...
rgrgrgr I have the same problem
avatar
crazytrader Is this working?
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...
Francesco78 I did a little bit of work on that and now the results looks better and more stable. Please...
Francesco78 I did a little bit of work on that and now the results looks better and more stable. Please...
Khaled Hi Francesco , thank you for sharing your hard work. Any idea why all orders are executed at...
JanWd Thank you for the coding, it seems promising. FTSE gives for the short term (5 min) promis...
Jan Wind 21.04.2019: I retested the strategy for the DAX 5 minutes , it works fine for 10.000 bars, b...
bertrandpinoy hello Francesco, are you still working on this strategy?
avatar
bjoern With the same parameters? For me the results are negative
avatar
bjoern Oh ok, with the initial posted parameters it is positive
victormork yes! It's not like you want to put it on live but when I for example take the version I have...
supertiti Thanks you so much Lucassen
dreif123 hi, copied the above code, not working on 10.3 the system says "return can only be used at ...
LUCASSEN Hallo , i have no problem , and i have the same versie 10.3, maybe you can ask Nicolas, tha...
otty82  all right. thanks
mmichael Hello, I noticed that the indicator shows the initial balance of today but also for all the ...
leyoy Bonjour, comment l'adapter sur 15 minutes au lieu de 1 heures ... j'ai changé 090000 par 081...
Derek Nice strategy. Have you tried adding a stop loss since there are a few sharp drawdowns? I ...
Piston_Broke Non so .... da qui la mia domanda iniziale :-)
Piston_Broke Hi Derek. I have tried many different ways to apply SL's to this and similar versions of th...
Nicolas Indeed, if you are not willing to loose, you will always win. Averaging down losers can carr...
David You're always safer going Long especially with averaging down on an index as the probability...
Oskar Bergvall  I noted Davids and Nicolas remarks. Could it be possible to make an indicator for contraria...
Lotar
8 years ago
Nicolas You can send it to contact@prorealcode.com and I'll attach it here. Thanks for your sharing!
Francesco78 Hi Lotar, which variables would you choose to recalibrate it to the present market condition...
Degardin Arnaud unfortunatly in today's market it's not working at all...

Top