Long only strategy with the TMA channel

Long only strategy with the TMA channel

as simple as it gets

I stole the indicator from here.
https://www.prorealcode.com/prorealtime-indicators/tma-center-channel-bands/
Then I rewrote the indicator into a strategy.

The action instruction is Long after the price crosses over (!) the lower band with the target the middle line of the channel.

thats all
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. ALZ • 12/13/2019 #

    Hi JohnScher,

    Nice work
    Is system works well in production ?

    With these parameters, the resultat is even better
    HalfLength = 151
    AtrLength = 151
    AtrMultiplier = 2.5

    • Ciurno981 • 12/13/2019 #

      Does anyone have the data at 200,000 units, why would I like to see over 5 years?

  2. ALZ • 12/13/2019 #

    With same parameters, it works as well on DJI / H1

  3. juju333 • 12/13/2019 #

    Thanks JohnScher for sharing and ALZ for optimization. I’ll try it !

  4. juju333 • 12/13/2019 #

    Slightly better in 100K (DAX H4) with this :
    TradingTime = time = 090000 or time = 130000 or time = 160000
    set target %profit 2

  5. ALZ • 12/13/2019 #

    thanks juju
    of course time isn’t optimized for DJI
    See below new version with optimized parameters
    with profit 1.5 and time = 090000 or time = 120000 on DJI H1
    we have 50.42 for the profit factor with only 2 losses

    • juju333 • 12/13/2019 #

      Not sure to have the good parameters : on DJI H1 (100 K, which brings back to 30 july 2015) ? could you repost the all code ? thanks !

  6. juju333 • 12/13/2019 #

    Quite good results with ‘Soy Flour’ (SM) too : +63.99 % in H4 100 K (dont’ really know the spread) :
    //————————————————————————-
    // maincode : TMA Channel 4H co lowerband
    // coded by johnscher

    // works on dax 1 euro
    // timeframe 4H
    // timezone europetime, berlin
    //————————————————————————-

    defparam cumulateorders = false

    // parameters
    HalfLength = 151
    AtrLength = 151
    AtrMultiplier = 2.5

    avg = average [1](close)

    sum = (HalfLength+1)*avg
    sumw = (HalfLength+1)
    k = HalfLength

    for j = 1 to HalfLength do
    k = k-1
    sum = sum+(k*avg[j])
    sumw = sumw+k
    next

    myrange = AverageTrueRange[AtrLength](close)*AtrMultiplier

    middleband = sum/sumw
    //higherband = buffer1+myrange
    lowerband = middleband-myrange

    TradingDay = opendayofweek = 1 or dayofweek = 2 or dayofweek = 3 or dayofweek = 4 or dayofweek = 5
    TradingTime = time = 090000 or time = 170000 or time = 230000

    IF TradingDay and TradingTime then
    if average [1] (close) crosses over lowerband then
    buy at market
    endif
    Endif

    if average [1] (close) crosses over middleband then
    sell at market
    endif

    set stop %loss 3
    set target %profit 4 // as insurance

  7. JohnScher • 12/13/2019 #

    Thank you very much. I am glad that the code is so well accepted here.

    As for improvements through optimization, I would like to say that I have not optimized through. I was more interested in trading the track from crossover the lowerline to the finish midline.

    Furthermore I would like to add that the system has been running in demo since 28.12.2018 with tema 12 close as avg and sl tp 2.4%.
    Number of trades = 12
    Won = 10
    loss = 2
    gains = 554 Euro

    From 01.01.20 it goes live at ig.com/australia with the germany 30 cash (1£)

    have good times
    until then

  8. ALZ • 12/13/2019 #

    Nice JohnSchern, thx for your contribution
    i’m going too with my parameters

  9. winnie37 • 12/13/2019 #

    could you post for Dji please?

    • JohnScher • 12/13/2019 #

      I’m sorry, I specialized in the Dax. I’m sure the basic idea of the strategy also works in the Dow Jones. Maybe, you can try the optimization for Dow Jones.

  10. ALZ • 12/13/2019 #

    Hi
    Regarding the DAX, it’s good too with 200k bars (with parameters of the basic idea)

    For DJI with 200k, i try to have good result but it seems to be impossible to apply this strategy on DJI… maybe other markets…

  11. Crystal Babe • 12/13/2019 #

    Hi John,
    this strategy is Great for DJI -justneededa bitof tweaking for the 1 hr chart. Thanks a million.
    though its coded to eit early at lowerchannel level , i have edited them to exit at higher levels with lovely results.
    John, if you dont mind can you explain which parameters i need to inverse to go short? ( planning for the near future:))

    • avatar
      Anonymous • 12/13/2019 #

      Hi Crystal Babe – would you be happy sharing your revised code as I too am testing this on the DJI? Many thanks

  12. sfl • 12/13/2019 #

    Hi,
    What is the meaning of the time filer ?
    Why 9:00 13:00 and 17:00 ?

    • JohnScher • 12/13/2019 #

      The 4H candles begin at 09.00 13.00 17.00

  13. Gigi • 12/13/2019 #

    Bonjour, pourrait on mettre cette stratégie en Daily?

  14. Marcelus • 12/13/2019 #

    Bonjour,

    Sur Dax , en 1h avec ces réglages depuis 2011 :
    – HalfLength = 170
    AtrLength = 40
    AtrMultiplier = 2.8

  15. Marcelus • 12/13/2019 #

    Bonjour,

    Sur Dax , en 4h avec ces réglages backtestés depuis 2011 (200000unités) :
    HalfLength = 170
    AtrLength = 40
    AtrMultiplier = 2.8
    sum = (HalfLength+1)*avg
    sumw = (HalfLength+16)
    set stop %loss 3
    set target %profit 3.6
    j’obtiens 83,78% de positions gagnantes, un profit factor de 2,73, et 84% de gain pour un capital de 10000€. si quelqu’un à mieux? Bien à vous.

  16. Bruno38340 • 12/13/2019 #

    Bonjour, merci pour le code… Comment peut-on changer/augmenter le nombre de lots achetés sur le Dax30 ?

    • Ciurno981 • 12/13/2019 #

      il suffit de changer le nombre de contrats à acheter

  17. Ludwig • 12/13/2019 #

    Bonjour
    Merci pour le code, je souhaite intégrer un break even et mette en place un réinvestissement mais impossible avec ce code, quelqu’un aurait une solution?

  18. superfalcio • 12/13/2019 #

    hello, this strategy is pretty interesting, anyway on index after diferent suggestion and improvement is there a resumed final strategy?

  19. Fralex • 131 days ago #

    Hello everyone
    I optimized the original “LongOnly-DAX-4H-TMA-Channel” algorithm over a period of 4 years, from January 2020 to December 2023
    The progression of earnings is regular.
    If you want to do the test, you must take the following parameters:
    HalfLength = 295
    AtrLength = 630
    AtrMultiply = 5.8
    set stop %loss 3.3
    set target %profit 5

    Note:
    I called my algorithm WMA and not TMA because the average is a weighted average and not a Triangular average.
    The backtest from August 2010 is correct (backtest 1 Mu)
    Optimization over 13.5 years gives a very good result

avatar
Register or

Likes

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

+3 more likes

Related users ' posts
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...
diegofe_2000 cordial saludo NICOLAS , gracias por excelente indicador. ¿ es posible obtenerlo en MT4 ? ...
Nicolas Lo siento, pero no estoy trabajando para ayudar a la gente aquí de forma gratuita para promo...
diegofe_2000 Nicolas , gracias por tu atención. La pregunta era por curiosidad (yo no trabajo ni manejo ...
ALE
7 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?
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?
albertocampagna Sei grande Nicolas :-)
SAcht Dear Nicolas, Great work, thank you very much!I would love to use the indicator in ProScree...
SAcht btw: The above-posted ProScreener is supposed to show stocks for which the center line has i...
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...
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
7 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...
Nicolas it is based on seasonality of DAX.
Luciano Santiago Juárez Hello I am new here I am trying to understand this code IF monthlyMultiplierLong > 0 ...
Luciano Santiago Juárez Sorry the code copied bad the line I dont understand is: ELSIF monthlyMultiplierLong 0 THEN
Wing Yes, investigate as much as you want. For more insight, you can view the linet1, linet2 etc....
CKW Hi Wing, Thanks for your sharing. I am still trying to breakdown & understand your code...
Wing Hello CKW. No, the parameter, 7 in this case, is used when calling the RSI indicator to ide...
Nacho Buenos días Raul, tengo puesto este sistema desde hace unos días en una cuenta demo en la ve...
Dominik Hola Raul ... it looks wonderful :-) Why does it not work if I use less than 100,000 € capi...
Bobbi Hola y gracias por compartir! Descubrí que en 5 minutos teníamos algo muy bueno! Pero no ...
danhei Hi I am tryong to figure out how trist strategy works. I am new to pro real time. Can some...
Plop61 Hello,Thank you for sharing this beautiful strategy.Is it possible to indicate the code for ...
NoName Thank you very much for this fascinating trading system. It is still proving to be extremely...
ALE
8 years ago
pollon Ciao Ale,  anche a me da questo errore  "QQE_QUDAX1HBUY"  "QQE_QUDAX1HSELL"  "UNIV_QUDAX...
reb Hi Ale do you trade these QU strategies?  Are the results same as backtests Thnaks in adv...
avatar
crazytrader Hi anyone that has run this lately?
larouedegann best with this hour IF TIME =081000 THEN plushaut=highest[2](high) plusbas = lowest[2](lo...
CanAny1Trade Hi! I'm trying to put together a similar indicator but struggling. I want to mark the NY Pit...
ALE Hi Pat This code was nothing more than an experiment
pat95162 Hi Ale Do you have same results as me ? The strategy works very well in 2017 and now in 2-...
Nicolas Built on the history means that it suits the history. Always develop ideas in In-Sample peri...
ALE
8 years ago
ALE no, only with TF 15m
enzo_52 Grazie tante, Thanks so much 
JanWd Hallo Ale, First of all, thank you for this strategy. Could you explain what the BLUSTER ...
Elsborgtrading No that is wrong :) 1st runs always- then only run 2nd if 1st is on market with positions(ar...
Elsborgtrading It can only be fully automated if IG change minimum SLto 7 at night on DAX multi timefra...
Elsborgtrading A small example. the strategy would have opened 3 position on Dec 4th 2016 and keept it for ...

Top