Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error HTF indicator - "Different performance with several Pcs and Licenses"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Error HTF indicator - "Different performance with several Pcs and Licenses"

    Good Morning:

    We have a problem with one of our ATS.

    The strategy works with Range chart and with an indicator that shows a superior HTF called "General Trend".

    The operation is that when the closing price is higher or lower than the plot "STrend" opens an operation in that direction if it coincides with the "General Trend" indicator.

    The "STrend" indicator is a trend modification based on an ATR. In the attached document you can visually see the operation of the ATS. The "General Trend" indicator is the "STrend" indicator on a higher HTF.

    Once we understand the operation of the strategy we detail the problem:

    - We have observed some great differences in the painting of the "General Trend" indicator between License Lease and License Demo. Within the License Lease, the tests performed in historical data have a small deviation in Real - Time.

    We attach a document called "Error in MTF - Visual Example" to understand exactly the problem.



    We need your help to be able to turn this ATS enable, because in License Lease all the tests performed are very good, but we are concerned about the great differences with other PCs and License Demo.

    We look forward to your response and help.
    Thanks and regards

    -------------------------------------
    CODE "STREND"
    -------------------------------------
    protected override void Initialize()
    {

    Add(new Plot(Color.Blue, "trail"));
    CalculateOnBarClose = true;
    Overlay = true;
    BarsRequired = 1;
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    if (CurrentBar < 1)
    return;

    // Trailing stop
    double trail;

    double loss = ATR(Input, Period)[0] * Multi;

    if (Close[0] > Value[1] && Close[1] > Value[1])
    {
    trail = Math.Max(Value[1], Close[0] - loss);
    PlotColors [0][0] = Color.Blue;
    BarColor = Color.Blue;
    }

    else if (Close[0] < Value[1] && Close[1] < Value[1])
    {
    trail = Math.Min(Value[1], Close[0] + loss);
    PlotColors [0][0] = Color.Red;
    BarColor = Color.Red;
    }

    else if (Close[0] > Value[1])
    {
    trail = Close[0] - loss;
    BarColor = Color.Blue;
    PlotColors [0][0] = Color.Blue;
    DrawArrowUp("Largo" + CurrentBar, false, 0, Low[0] - 4 * TickSize, Color.Blue);
    }

    else
    {
    trail = Close[0] + loss;
    PlotColors [0][0] = Color.Red;
    BarColor = Color.Red;
    DrawArrowDown("Corto" + CurrentBar, false, 0, High[0] + 4 * TickSize, Color.Red);

    }

    Value.Set(trail);

    }

    --------------------------------
    CODE GENERALTREND
    ----------------------------------

    Add(PeriodType.Minute, secondaryPeriod);
    // Add(PeriodType.Custom5, renkoperiod);
    Add(new Plot(Color.FromKnownColor(KnownColor.Crimson), PlotStyle.Line, "Corto"));
    Add(new Plot(Color.FromKnownColor(KnownColor.MediumSeaGree n), PlotStyle.Line, "Largo"));
    Overlay = false;
    // Corto = new DataSeries(this);
    // Largo = new DataSeries(this);
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {

    if (CurrentBars[1] < BarsRequired || CurrentBars[0] < BarsRequired)return;


    if (BarsInProgress == 0)
    {

    if (Closes[1][0] > STrend(BarsArray [1], sensibilidad, 1)[0])
    {
    Largo.Set(1);
    Print(Largo[0]);
    Print("VERDE : " + CurrentBar);
    BackColor = Color.MediumSeaGreen;
    }

    if (Closes[1][0] < STrend(BarsArray [1], sensibilidad, 1)[0])
    {
    Corto.Set(0);
    Print(Corto[0]);
    Print("ROJO : " + CurrentBar);
    BackColor = Color.Crimson;
    }
    }


    }
    Attached Files

    #2
    Hello IVENTISTENERFE,

    Thank you for your post.

    I will continue to work with you over email, we can then post a solution here once it is found.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    639 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    572 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X