NexusFi: Find Your Edge


Home Menu

 





Indicator of Metastock to NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one dimitri with 5 posts (0 thanks)
    2. looks_two vegasfoster with 2 posts (2 thanks)
    3. looks_3 MooreTech with 2 posts (3 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 6,027 views
    2. thumb_up 5 thanks given
    3. group 3 followers
    1. forum 10 posts
    2. attach_file 1 attachments




 
Search this Thread

Indicator of Metastock to NinjaTrader

  #1 (permalink)
 dimitri 
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
Posts: 76 since Jul 2010
Thanks Given: 202
Thanks Received: 36

Hi,
I am actualy new in NinjaTrader and i am trying to convert some indicators to NinjaTrader language.

1) Ref(LLV(C,2),-1) means plot the price (value) of Previous Day --Ref(........,-1)-- of ...(LLV(C,2),..) means
Lowest Low Value , Closing Price, 2=2 Last Time Periods.

2) Ref(HHV((H-L),2),0) means plot the price (value) of Today --Ref(........,0)-- of ...(HHV(H-L,2),..) means
Highest HighValue , Closing Price, 2=2 Last Time Periods.

Anybody who can give a help because i am not a programmer for NinjaTrader.
My mail [email protected]

Thank you for your attention
dimitri

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
GFIs1 1 DAX trade per day journal
11 thanks
HumbleTraders next chapter
11 thanks
  #3 (permalink)
 MooreTech 
Orlando, Florida
 
Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Trading: ES
Posts: 57 since Aug 2010
Thanks Given: 6
Thanks Received: 73


dimitri,
I think this is what you're looking for.

1) MIN(Close,2)[1]
2) MAX(Close,2)[1]


dimitri View Post
Hi,
I am actualy new in NinjaTrader and i am trying to convert some indicators to NinjaTrader language.

1) Ref(LLV(C,2),-1) means plot the price (value) of Previous Day --Ref(........,-1)-- of ...(LLV(C,2),..) means
Lowest Low Value , Closing Price, 2=2 Last Time Periods.

2) Ref(HHV((H-L),2),0) means plot the price (value) of Today --Ref(........,0)-- of ...(HHV(H-L,2),..) means
Highest HighValue , Closing Price, 2=2 Last Time Periods.

Anybody who can give a help because i am not a programmer for NinjaTrader.
My mail [email protected]

Thank you for your attention
dimitri


Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 dimitri 
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
Posts: 76 since Jul 2010
Thanks Given: 202
Thanks Received: 36

Thank you for your reply.
Is that possible to send me as an indicator so i can import and check....
Thank you again
Dimitri

Started this thread Reply With Quote
  #5 (permalink)
 MooreTech 
Orlando, Florida
 
Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Trading: ES
Posts: 57 since Aug 2010
Thanks Given: 6
Thanks Received: 73

This is the code for the indicator. Are you using NT 6.5 or 7?

 
Code

#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion

// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
    /// <summary>
    /// Enter the description of your new custom indicator here
    /// </summary>
    [Description("Enter the description of your new custom indicator here")]
    public class test : Indicator
    {
        #region Variables
        // Wizard generated variables
            private int barsBack = 2; // Default setting for BarsBack
        // User defined variables (add any user defined variables below)
        #endregion

        /// <summary>
        /// This method is used to configure the indicator and is called once before any bar data is loaded.
        /// </summary>
        protected override void Initialize()
        {
            Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
            Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot1"));
            CalculateOnBarClose    = true;
            Overlay                = true;
            PriceTypeSupported    = false;
        }

        /// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        protected override void OnBarUpdate()
        {
            if (CurrentBar<barsBack)
                return;
            
            double min = MIN(Close,barsBack)[1];
            double max = MAX(Close,barsBack)[0];
            Plot0.Set(min);
            Plot1.Set(max);
        }

        #region Properties
        [Browsable(false)]    // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
        [XmlIgnore()]        // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
        public DataSeries Plot0
        {
            get { return Values[0]; }
        }
        
        [Browsable(false)]    // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
        [XmlIgnore()]        // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
        public DataSeries Plot1
        {
            get { return Values[1]; }
        }

        [Description("")]
        [Category("Parameters")]
        public int BarsBack
        {
            get { return barsBack; }
            set { barsBack = Math.Max(1, value); }
        }
        #endregion
    }
}
Also, the description you give "2) Ref(HHV((H-L),2),0) means plot the price (value) of Today --Ref(........,0)-- of ...(HHV(H-L,2),..) means Highest HighValue , Closing Price, 2=2 Last Time Periods." looks inconsistent. HHV((H-L),2) looks like you are using the value of H-L, not the closing price. Which is correct? The code above uses closing prices.

Follow me on Twitter Reply With Quote
Thanked by:
  #6 (permalink)
 dimitri 
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
Posts: 76 since Jul 2010
Thanks Given: 202
Thanks Received: 36

Dear Sirs,
Thank you really very much for your REPLY ... !!!

As i am testing both NT 6.5 and 7, please info me if special attention needed.
I told that i am novice in NT, please tell me how to impost this "test" indicator and how to save it. Because i have tried to replace the content of another indicator which i create through "indicator wizard" and i replaced all the "text", but it does not show on the indicator list if i want to apply on to a chart..... , but it appears in the "edit indicator" menu.... Please Help.

Thank you in advance
Best Regards
Dimitri

Started this thread Reply With Quote
  #7 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844

"public class test : Indicator"

I believe this part of the code controls the name, after pasting and compiling can you see the indicator listed as "test"?

Reply With Quote
  #8 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844

No, that's not it, I don't know how it works, but try this, click File, Utilities, Import Ninjascript and select this file.

Attached Files
Elite Membership required to download: DimitriHighLow.zip
Reply With Quote
Thanked by:
  #9 (permalink)
 dimitri 
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
Posts: 76 since Jul 2010
Thanks Given: 202
Thanks Received: 36

Dear VEGASFOSTER,
Thank you very much too, for your help. I will try it and let know to all of you....
Could you, please expain how to "produce" a text (indicator/strategy) into a ZIP and .cs file ?????

Thank you again
Dimitri

Started this thread Reply With Quote
  #10 (permalink)
 dimitri 
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
Posts: 76 since Jul 2010
Thanks Given: 202
Thanks Received: 36


Dear VEGASFOSTER,

I have tried, it looks OK!.
If i need them separated also .... how could i do that ?????

Regards
Dimitri

Started this thread Reply With Quote




Last Updated on August 10, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts