back test super trend indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #194670 quote
    mariamfi
    Participant
    New

    I’m new in programming.

     

    I would to write backtesting for “super Trend” indicator.

    How to detect when the indicator changed it’s color ?

    #194687 quote
    robertogozzi
    Moderator
    Master

    There you go:

    ST      = Supertrend[3,10]
    Bullish = close > ST
    Bearish = close < ST
    Change  = (Bullish AND Bearish[1]) OR (Bullish[1] AND Bearish)

    The variable CHANGE will be true when there’s been a change in the colour. You can use either BULLISH or BEARISH to know whare it is sitting on the chart.

    #194841 quote
    Nicolas
    Keymaster
    Master

    It happens when the Close crosses over or crosses under:

    red = close crosses under supertrend[3,10]
    green = close crosses over supertrend[3,10]
    robertogozzi thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

back test super trend indicator


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
mariamfi @mariamfi Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Nicolas
3 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/05/2022
Status: Active
Attachments: No files
Logo Logo
Loading...