• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    Patrick H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rouillard, Today, 03:34 PM
    2 responses
    17 views
    0 likes
    Last Post rouillard  
    Started by mquinteroj, Today, 02:41 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by JPPoulin, Today, 01:32 PM
    4 responses
    15 views
    0 likes
    Last Post JPPoulin  
    Started by bltdavid, Today, 01:09 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by pstrusi, Today, 12:50 PM
    2 responses
    8 views
    0 likes
    Last Post pstrusi
    by pstrusi
     
    Working...
    X