Wanted: small code snippet for reinvestment

Forums ProRealTime English forum ProOrder support Wanted: small code snippet for reinvestment

Viewing 15 posts - 46 through 60 (of 69 total)
  • #59043

    Out of interest – what settings are you running on that SuperTrend on the 4HR chart?

    #59044

    Out of interest – what settings are you running on that SuperTrend on the 4HR chart?

    [1.9, 10], as the image says on the upper left. The ATR component looks 10 periods back, and the supertrend line is 1.9 * ATR away from the medianprice, roughly spoken.

    #59051
    [1.9, 10], as the image says on the upper left.
    Sorry should have seen that  – I think I need new glasses!
    #59144

    You should have a look at this customized Supertrend 

    1 user thanked author for this post.
    #59179

    You should have a look at this customized Supertrend

    I have tried out most of these variants, but the standard supertrend with ATR usually gives best results in simple systems that trade long and short from supertrend cut to supertrend cut. This criterion is usually a good first selection.

    In addition, manual supertrends run slowly and decelerate backtests a lot.

    The only real advantage I have ever found in a customized supertrend was to leave the volatility component (ATR or STD) away entirely, and replace it by a fixed amount of points – or better a fixed fraction of current price. Sometimes, especially when you do long backtests over 10 years with DAX prices ranging  from 4.000 to 13.500, this gives better results. See the following example.

    The parameter “factor” in line 9 changes the distance of the supertrend line from the last highest or lowest medianprice. It sets the distance to a fraction of the current “close” value. Try 0.005 as an initial setting, but of course it depends on the time scale and on the instrument you are looking at.

    This supertrend will not move closer to the price in sideward movements (like the normal supertrend), when volatility decreases, but will stay constant all the time, as long as price does not change.

    This version is also quite well optimized for speed.

    #59181

    That is an interesting new look at SuperTrend. I wasn’t getting any colour with the way the code is written. Never seen ‘coloured as’ before? So I changed it slightly. You should maybe put it in the library for others to consider using.

     

    #59182

    colour was only coded this way so you can set it yourself in the indicator box. By default, it is black.

    #59186

    That is an interesting new look at SuperTrend. I wasn’t getting any colour with the way the code is written. Never seen ‘coloured as’ before? So I changed it slightly. You should maybe put it in the library for others to consider using.

     

    I usually prefer not to judge the optical impression of an indicator. People always show complex and nicely coloured indicators in a chart place that fits best their intentions and appears to work in this detail. In my opinion, the usefulness of an indicator can only be judged by coding a trading system that trades the signals of this indicator. So I rarely use my own indicators in charts, only in trading codes. But thanks for your colour code addition, anyway, so I do not have to look it up.

    This version of supertrend is simpler than the normal supertrend, because there is only one adaptable parameter (factor). Curve fitting is not so easy, then. It behaves more like a common trailing stop, because volatility is not used.

    #59187

    colour was only coded this way so you can set it yourself in the indicator box. By default, it is black.

    Thanks – wasn’t aware that you could do it like that.

    #59234

    @vonasi

     

    Ich sehe das wir uns hier auf Deutsch unterhalten können.

    Damit wird es für mich einfacher, verständlich zu bleiben.

     

     

    Kannst du mir einen Gefallen tun, und den folgenden Code durch einen Backtest jagen und gucken ob die Ergebnisse halbwegs gleich sind?

    Ich halte das Ergebnis schlichtweg für unglaublich.

    den “Call NR7” kann ich nachreichen

    Nikolas meinete “overfitted” dazu …. aber ja, von mir aus.

     

     

    #59239

    und das hier noch, hat oben nicht mehr reingepasst

    #59255

    give me 5 points and I fit you an elephant

    give me 100 points and the elephant will look really nice

    traditional saying from experimental physics

    ohne den Code ausprobiert zu haben, natürlich

     

    #59256

    Hello JohnScher. Yes speaking German is fine….. only I don’t understand a word of it…. oh and the moderators will be along any minute to tell you not to in an English speaking forum. I just use Google translate though – it is normally good for a laugh.

    I have not tested the above strategy for two reasons that are shown in the images. It just will not work in real life which is why the equity line is so perfect.

    #59260

    Gut, dann entschuldige ich mich bei dir, dass ich dich mit @vonasi falsch angesprochen habe.

    Würdest du trotzdem den Code mal durch einen Backtest jagen?

    #59261

    @vonasi

     

    That’s exactly the question that haunts me.
    How do such errors occur?

Viewing 15 posts - 46 through 60 (of 69 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login