Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

why this indicator not see in indiocator list ?

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

    why this indicator not see in indiocator list ?

    why this insdicator not see in indicator list ? , but in folder indicator exist ?

    #region Using declarations
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Data;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.Core.FloatingPoint;
    using NinjaTrader.NinjaScript.DrawingTools;

    using System.IO;
    using System.IO.MemoryMappedFiles;
    #endregion

    //This namespace holds Indicators in this folder and is required. Do not change it.

    ///Sim22 Jan 2016
    ///
    namespace NinjaTrader.NinjaScript.Indicators.Sim22.GlobalVar iables
    {
    public class Amba : Indicator
    {
    RSI myRSI;
    MemoryMappedFile file;

    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"Set the RSI value to a memory mapped file to be used by a 'Get' indicator";
    Name = "Amba";
    Calculate = Calculate.OnPriceChange;
    IsOverlay = true;
    DisplayInDataBox = true;
    DrawOnPricePanel = true;
    DrawHorizontalGridLines = true;
    DrawVerticalGridLines = true;
    PaintPriceMarkers = true;
    ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
    varName = "EnterName";
    //Disable this property if your indicator requires custom values that cumulate with each new market data event.
    //See Help Guide for additional information.
    IsSuspendedWhileInactive = true;
    }
    else if (State == State.Configure)
    {
    myRSI = RSI(7,1);
    file = MemoryMappedFile.CreateOrOpen(varName, 1, MemoryMappedFileAccess.ReadWrite);

    }
    else if (State == State.Terminated)
    {
    file.Dispose();
    }
    }

    protected override void OnBarUpdate()
    {
    //double rsi = myRSI[0];
    byte[] data = Encoding.UTF8.GetBytes ("This is a test");


    using (MemoryMappedViewAccessor accessor =
    file.CreateViewAccessor())
    {
    accessor.Write(0,data.Length);
    // Print("Set= " + rsi);
    }
    }

    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
    {
    Print(State.ToString());
    }

    #region Properties
    [NinjaScriptProperty]
    [Display(ResourceType = typeof(Custom.Resource), Name = "Name of variable", GroupName = "NinjaScriptParameters", Order = 0)]
    public string varName
    { get; set; }
    #endregion
    }
    }

    #region NinjaScript generated code. Neither change nor remove.

    namespace NinjaTrader.NinjaScript.Indicators
    {
    public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
    {
    private Sim22.GlobalVariables.Amba[] cacheAmba;
    public Sim22.GlobalVariables.Amba Amba(string varName)
    {
    return Amba(Input, varName);
    }

    public Sim22.GlobalVariables.Amba Amba(ISeries<double> input, string varName)
    {
    if (cacheAmba != null)
    for (int idx = 0; idx < cacheAmba.Length; idx++)
    if (cacheAmba[idx] != null && cacheAmba[idx].varName == varName && cacheAmba[idx].EqualsInput(input))
    return cacheAmba[idx];
    return CacheIndicator<Sim22.GlobalVariables.Amba>(new Sim22.GlobalVariables.Amba(){ varName = varName }, input, ref cacheAmba);
    }
    }
    }

    namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
    {
    public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
    {
    public Indicators.Sim22.GlobalVariables.Amba Amba(string varName)
    {
    return indicator.Amba(Input, varName);
    }

    public Indicators.Sim22.GlobalVariables.Amba Amba(ISeries<double> input , string varName)
    {
    return indicator.Amba(input, varName);
    }
    }
    }

    namespace NinjaTrader.NinjaScript.Strategies
    {
    public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
    {
    public Indicators.Sim22.GlobalVariables.Amba Amba(string varName)
    {
    return indicator.Amba(Input, varName);
    }

    public Indicators.Sim22.GlobalVariables.Amba Amba(ISeries<double> input , string varName)
    {
    return indicator.Amba(input, varName);
    }
    }
    }

    #endregion


    #2
    Hello faustf,

    As a tip, to export an entire NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:
    1. Click Tools -> Export -> NinjaScript...
    2. Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
    3. Click the 'Export' button
    4. Enter a unique name for the file in the value for 'File name:'
    5. Choose a save location -> click Save
    6. Click OK to clear the export location message
    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
    Below is a link to the help guide on Exporting NinjaScripts.



    May I confirm that the script is not excluded from compilation and is able to compile?


    It looks like this script will be in a folder named Sim22. Are you look in a folder named Sim22?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    671 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    379 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    582 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X