back test super trend indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #194670 quote
    mariamfimariamfi
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    NicolasNicolas
    Keymaster
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 NicolasNicolas
4 years, 3 months ago.

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