SuperTrend and Commodity Channel Index Strategy

SuperTrend and Commodity Channel Index Strategy

Hi all,

It’s my first contribution.

Simple code that works with “Supertrend” and “Commodity Channel Index” Indicators.

Run on: standard Crude Oil contract (Oil US Crude)
Timeframe: 30 Min
Period from 21-Dic-2015 to 22-Oct-2016: best result with this parameters
Spread: 3

I didn’t try with real money but considering that it works with only 2 indicators, I think it should be no problem.
Never close deal on zero bar.
For verify and testing it, you can activate Supertrend on the price chart.
Try to activate Reinvest Capital with RISK Param=44 on the same period.
Adjust parameters for different Timeframe or others products.
Some suggestions for improving the code?

 

 

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. Nicolas • 10/23/2016 #

    Thank you Dany to contribute to our prorealtime code library 🙂
    Even since 200k bars testing were not so great than the last year result, strategy isn’t so bad at all. An intraday strategy is hard to achieved on commodities and you have made it with current indicators with their default parameters. Well done. I’m looking forward for your next contribution.  

  2. Philippo • 10/23/2016 #

    Thanks, have downloaded and will check it tomorrow

  3. Philippo • 10/23/2016 #

    Supertrend looks really cool! I will post something once it’s worth consideration. Thanks Dany 🙂

  4. Philippo • 10/23/2016 #

    Hi, a couple of suggestions:
    use CROSS OVER and CROSS UNDER with CCI, this way you catch the beginning of the move and can open up to the possibility of cumulate orders
    once surfing the super trend, find new entry points like when the CCI makes V shape, again with cumulation.
     
    cheers

    • DANY • 10/23/2016 #

      Thanks for your suggestions Philippo. Sounds good…. I’ll try as soon as possibile.
      Have a nice day.

  5. demoz • 10/23/2016 #

    Did anyone test this live?

    • DANY • 10/23/2016 #

      I did it on demo account; it’s too dangerous for mea and I can not resist psychologically  …., but it’s perfectly aligned to backtest, so you can try it in order to verify the performance in the last 40 days … 🙂 About 5.000 euros
      Have a nice gain !

    • demoz • 10/23/2016 #

      How can a demo account be dangerous?
      Did you have it run live (on a demo account for example) for let’s say, a month or so?

    • DANY • 10/23/2016 #

      Yes, I mean that I tried on a demo account for 2 months and it had work fine, like the BackTesting, but there are a lot of consecutive losses.If you start in a wrong way and you take immediately all the consecutive losses, it’s hard to recover them. So, I suggest you to consider this thing and to test well before take a decision to use it.
      It does work very well with an high volatility.
      Ciao.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Juan Salas Hi FULVIO09, Nice piece of work. It seems to work very well. Does only work for INDEXES??...
Johann Hi @FULVI09, I understand the instructions however I'm not too sure how to determine the "p...
Player8520 Hello, It doesn't work with me either. However, I changed AA to 180 on line 15, added th...
eckaw Hi Nicolas, I'm using this indicator when there is confluence over 3 different timeframes (5...
Nicolas Yes it is indeed possible. Create a topic in the screener forum and explain what you need an...
KyleReed i've been using this for a few days now and it's really helped me a lot in timing the execut...
Nicolas Thanks again for all your valuable posts... and well formatted code! :)
Abdelkrim Maksour hi sir is this indicator for mt4 and how i can get one .
ALE Hi the color is given by a numerical value derived from the oscillator in use. If you comp...
efahmy Thanks mate
Jo-01-R Hello, it is possible to have this indicator but instead of colors rather have numbers rangi...
Geronima Ortiz I watched the video three times, but I can not put the npips parameter as a variable. I do...
Geronima Ortiz I think the video is for an old version of prorealtime, the images do not correspond at all ...
Nicolas indicator1 = CALL “PRC_StopReversal”[npips, 1] and define npips in the optimization window ...
Caribeengeek Bonjour j’avais vu que vous proposiez d’écrire des codes pour ceux qui s’y connaisse pas Mai...
Caribeengeek Les devises unité
Nicolas Merci d'utiliser le forum pour les demandes de programmation personnalisée
FULVIO09
6 years ago
CCI Correction.IND
CCI Correction.IND
1
Indicators
Agima Bonjour Une petite question d'un débutant : Comment faire pour afficher les variables à gau...
verdi55 You can find me at www.FXautomate.com Ahh. So i got it ? 4 different supertrends without th...
juanj What? This has nothing to do with the website. The site is simply a service to help people ...
Nicolas Advertising is allowed,as long as people are helping others and if provided services are abo...
jebus89 Big thanks for sharing this :) Seems to work as expected, good stuff.
WarningTrading Comment peut on la comparer ? comme ceci ? cela ne me donne plus le message d'erreur manque...
sally31120 Bonjour, je n'arrive pas à créer ce screener close > supertrend extended2[1] la réponse...
Nicolas voir ce sujet pour un screener basé sur Supertrend Extended: https://www.prorealcode.com/top...
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...
verdi55 Is there such a thing as a free lunch ?
maceng Thanks Nicolas for this great work! I would like to understand the math behind it in order t...
Nicolas Sorry I have no time to provide assistance for python programmers. Have a good day.
Nicolas You need to have enough bars loaded on your chart for the indicator to compute completely th...
verdi55 Working with separately calculated supertrend indicators in backtests is usually somewhat pr...
Nicolas Very interesting Verdi. Would be a great addition to the library, your own modified version ...
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...
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 ...
Nicolas En effet, j'ai déjà eu ce genre de retour sur cet indicateur, je t'avoue avoir eu du mal à c...
Lavallette Bonjour Nicolas. Je trouve cet indicateur intéressant et j'essaie de l'intégrer dans une st...
Nicolas Non tout est correct, mais je comprends que tu aies un doute. C'est la façon dont a été écri...
eisi If i switch between different Markets, the Backgroundcolour will appear where it should not...
datageek How can I get alerts on colour change?
NAMBO40 Hello, I would like to add a 25 period SMA moving average. It's possible?
avatar
Anonymous We try to enter before that the market actually turn. We try to anticipate it. In which way ...
dwgfx David-1984 are you saying that you've already factored in the spread within the code?  If y...
avatar
Anonymous no, not in teh code... only in the backtest. The entry is only between 8/22 so the spread fo...
Doctrading
8 years ago
gianlox What markets did you feel ? Thanks..
wanjpt Doctrading, could you code an alert when the supertrend touches price for various timeframes...
JSTAR PRODUCTIONS Hi there DocTrading, I have run this Screener and it only seems to screem When trend line to...

Top