Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Access to BetterSinewave Variables

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

  • Crassius
    replied
    Originally posted by koganam View Post
    Uh oh!! It looks like you are right. And since you are using the FQPN, if that were a public property, that should be accessible. What does Intellisense say? It seems to me that the author may have intended to make it public, but may actually not have? I guess it is time to contact the author.

    The OP should not ask for help with his code from the author; that is probably why he is not responding. Instead he should state that he is getting an error trying to access a property that the author claims is exposed. A lot of programmers that I know refuse to look at another person's code, just so they do not get hit with copyright issues. (Basically, the attitude is: "If I never saw your code, you cannot later claim that I stole it.")
    read this after my last post...

    Yes, I think that is the case.... the property is SUPPOSED to be public but there is an error in the vendors script and that property is not exposed...

    I know the vendor, Barry, is not a C# programmer and hired a NinjaScript consultant to translate his original EasyLanguage code, so he wouldn't know if it is exposed properly or not by looking at the code.

    I suggest the OP contact Barry and let him know that this has been looked into by more than just the OP and it appears to us that the property is not exposed and is not working as advertised.

    Leave a comment:


  • Crassius
    replied
    I made a new indicator to test the two public properties:

    Code:
    protected override void OnBarUpdate()
            {
               betterSineWaveSine = BetterSinewave(password,true).Sine[0];
                Print(betterSineWaveSine);
                //betterPBTrend = BetterSinePB(Color.Red,password,Color.Green).TrendSeries[0];
    //Print(betterPBTrend);
            }
    The Sine property works, the TrendSeries property still give sthe error message,

    Does not contain definition for...

    Leave a comment:


  • koganam
    replied
    Originally posted by Crassius View Post
    Thanks for looking into this, Koganam,

    Even when I comment out the TrendSeries language in the original posters script... including the properties it won't compile.

    The instructions from the indicator vendor are that TrendSeries is a public property of BetterSinePB.

    He gives a similar public property for his related indicator BetterSineWave of BetterSineWave.Sine. This compiles:

    Code:
    double test = BetterSinewave(password,true).Sine[0];
    This would store the current bars value of Sine into the double test.

    The vendor gives BetterSinePB.TrendSeries[barsAgo] as the instructions for retrieving the public property TrendSeries from BetterSinePB.
    Uh oh!! It looks like you are right. And since you are using the FQPN, if that were a public property, that should be accessible. What does Intellisense say? It seems to me that the author may have intended to make it public, but may actually not have? I guess it is time to contact the author.

    The OP should not ask for help with his code from the author; that is probably why he is not responding. Instead he should state that he is getting an error trying to access a property that the author claims is exposed. A lot of programmers that I know refuse to look at another person's code, just so they do not get hit with copyright issues. (Basically, the attitude is: "If I never saw your code, you cannot later claim that I stole it.")

    Leave a comment:


  • Crassius
    replied
    Thanks for looking into this, Koganam,

    Even when I comment out the TrendSeries language in the original posters script... including the properties it won't compile.

    The instructions from the indicator vendor are that TrendSeries is a public property of BetterSinePB.

    He gives a similar public property for his related indicator BetterSineWave of BetterSineWave.Sine. This compiles:

    Code:
    double test = BetterSinewave(password,true).Sine[0];
    This would store the current bars value of Sine into the double test.

    The vendor gives BetterSinePB.TrendSeries[barsAgo] as the instructions for retrieving the public property TrendSeries from BetterSinePB.
    Last edited by Crassius; 04-25-2012, 05:15 PM.

    Leave a comment:


  • koganam
    replied
    Originally posted by Crassius View Post
    It also gives the same error when you:

    Code:
    double test = BetterSinePB(Color.Red,Password,Color.Green).TrendSeries[0];
    Any other ideas, oh learned one, Koganam?
    Same error; same reason. TrendSeries is not an entity in BetterSinePB: it is a DataSeries defined in the current class.

    Leave a comment:


  • Crassius
    replied
    Originally posted by koganam View Post
    I do not understand what you are trying to achieve, and I do not have the Betterxxx indicators, but that message is correct. You have defined sig3 as an instance of BetterSinePB. TrendSeries is a DataSeries that you created as an independent object. There is no definition of your independent TrendSeries inside the BetterSonePB of which sig3 is an instance.
    It also gives the same error when you:

    Code:
    double test = BetterSinePB(Color.Red,Password,Color.Green).TrendSeries[0];
    Any other ideas, oh learned one, Koganam?

    Leave a comment:


  • koganam
    replied
    Originally posted by magnumdbl View Post
    These are the indicator outputs the seller says that I should be able to get.


    Use these variables to access public values/states for Better Sine Wave indicators:
    BetterSinewave.Sine[BarsAgo]
    BetterSinewave.LeadSine[BarsAgo]
    BetterSineSR.Support[BarsAgo]
    BetterSineSR.Resistance[BarsAgo]
    BetterSineSR.BreakLo[BarsAgo]
    BetterSineSR.BreakHi[BarsAgo]
    BetterSineSR.PullBackSeries[BarsAgo]
    BetterSineSR.EndOfTrendSeries[BarsAgo]
    BetterSinePB.TrendSeries[BarsAgo] (UpTrend +1, DownTrend -1, NoTrend 0)

    I can send you my program if that helps.

    #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

    namespace NinjaTrader.Indicator
    {

    //================================================== ==============
    [Description("Gets the 'TrendSeries' .")]
    public class dbBSWGet : Indicator
    {
    private BetterSinePB sig3; //BetterSine PB is part of Trend direction.

    //================================================== ==============
    #region Variables
    // True/False Inputs to show arrows.
    private bool showBetterSinePB = false; // 1a (B) Arrows Up/Dn BarC

    // BetterSinePB Bar Trend Series
    private string bswPassword;
    private DataSeries trendSeries; // TrendSeries = +1

    #endregion

    //================================================== ==============
    protected override void Initialize()
    {
    trendSeries = new DataSeries(this); // This is the BetterSinePB Trend Number.
    Overlay = true; // This should draw Plots on the Chart Panel.
    DrawOnPricePanel = true;
    CalculateOnBarClose = true;
    }
    //================================================== ==============
    protected override void OnStartUp()
    {
    sig3 = BetterSinePB(Color.Red,bswPassword,Color.Green);
    }


    protected override void OnBarUpdate()
    {

    if(CurrentBar<1) return;

    // ------------------- Logic for BetterSineWave Arrows -------------------
    if( showBetterSinePB == true)
    {
    // double d = sig3.TrendSeries[0] ; // BetterSinePB (Take out'//' at left)
    }



    }

    #region Properties
    // ------- Data Series -------- //

    [XmlIgnore()]
    [Browsable(false)]
    public DataSeries TrendSeries
    {
    get { return trendSeries; }
    set { trendSeries = value;}
    }


    // BetterSinePB
    [Description("Enter your Password.")]
    [Category("2 - Better SineWave Input")]
    [Gui.Design.DisplayName(" Your Password")]
    public string BswPassword
    {
    get { return bswPassword; }
    set { bswPassword = value;}
    }


    #endregion
    }
    }

    If you have the BetterSinePB you can probably paste this code into a new indicator
    and see what I see.
    Need to take out the '//' at line 58 and I get the error CS1061 that says:
    'NinjaTrader.Indicator.BetterSinePB' does not contain a definition for 'TrendSeries'

    Thanks,
    Don
    I do not understand what you are trying to achieve, and I do not have the Betterxxx indicators, but that message is correct. You have defined sig3 as an instance of BetterSinePB. TrendSeries is a DataSeries that you created as an independent object. There is no definition of your independent TrendSeries inside the BetterSonePB of which sig3 is an instance.

    Leave a comment:


  • Crassius
    replied
    Got it. Successfully imported despite warnings...

    I'll play around with it and get back to you.

    Leave a comment:


  • magnumdbl
    replied
    Better Sinewave - emini-watch

    Here's my .cs. Beware that I did get a strange message saying you would need access to 5 other files which don't involve the cs that i'm sending. Never got that message before.

    If it won't work.
    It's really easy to paste into a new Indicator. I've done it many times.

    Let me know if it imports for you.
    I can walk you through the procedure if necessary.
    dbl
    Attached Files

    Leave a comment:


  • magnumdbl
    replied
    Better Sinewave - emini-watch

    These are the indicator outputs the seller says that I should be able to get.


    Use these variables to access public values/states for Better Sine Wave indicators:
    BetterSinewave.Sine[BarsAgo]
    BetterSinewave.LeadSine[BarsAgo]
    BetterSineSR.Support[BarsAgo]
    BetterSineSR.Resistance[BarsAgo]
    BetterSineSR.BreakLo[BarsAgo]
    BetterSineSR.BreakHi[BarsAgo]
    BetterSineSR.PullBackSeries[BarsAgo]
    BetterSineSR.EndOfTrendSeries[BarsAgo]
    BetterSinePB.TrendSeries[BarsAgo] (UpTrend +1, DownTrend -1, NoTrend 0)

    I can send you my program if that helps.

    #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

    namespace NinjaTrader.Indicator
    {

    //================================================== ==============
    [Description("Gets the 'TrendSeries' .")]
    public class dbBSWGet : Indicator
    {
    private BetterSinePB sig3; //BetterSine PB is part of Trend direction.

    //================================================== ==============
    #region Variables
    // True/False Inputs to show arrows.
    private bool showBetterSinePB = false; // 1a (B) Arrows Up/Dn BarC

    // BetterSinePB Bar Trend Series
    private string bswPassword;
    private DataSeries trendSeries; // TrendSeries = +1

    #endregion

    //================================================== ==============
    protected override void Initialize()
    {
    trendSeries = new DataSeries(this); // This is the BetterSinePB Trend Number.
    Overlay = true; // This should draw Plots on the Chart Panel.
    DrawOnPricePanel = true;
    CalculateOnBarClose = true;
    }
    //================================================== ==============
    protected override void OnStartUp()
    {
    sig3 = BetterSinePB(Color.Red,bswPassword,Color.Green);
    }


    protected override void OnBarUpdate()
    {

    if(CurrentBar<1) return;

    // ------------------- Logic for BetterSineWave Arrows -------------------
    if( showBetterSinePB == true)
    {
    // double d = sig3.TrendSeries[0] ; // BetterSinePB (Take out'//' at left)
    }



    }

    #region Properties
    // ------- Data Series -------- //

    [XmlIgnore()]
    [Browsable(false)]
    public DataSeries TrendSeries
    {
    get { return trendSeries; }
    set { trendSeries = value;}
    }


    // BetterSinePB
    [Description("Enter your Password.")]
    [Category("2 - Better SineWave Input")]
    [Gui.Design.DisplayName(" Your Password")]
    public string BswPassword
    {
    get { return bswPassword; }
    set { bswPassword = value;}
    }


    #endregion
    }
    }

    If you have the BetterSinePB you can probably paste this code into a new indicator
    and see what I see.
    Need to take out the '//' at line 58 and I get the error CS1061 that says:
    'NinjaTrader.Indicator.BetterSinePB' does not contain a definition for 'TrendSeries'

    Thanks,
    Don

    Leave a comment:


  • Crassius
    replied
    Not sure what you are asking... do you want to find the value of a specific plot at a specific bar?

    Leave a comment:


  • magnumdbl
    started a topic Access to BetterSinewave Variables

    Access to BetterSinewave Variables

    I bought the BetterSinewavePB and SR from emini-watch.com.

    They say that accessing the variables is very simple, however my coding was
    not able to bring them up.

    If anyone has experience with this program or his new programs let me know
    and I will share my code and you can tell me where I can make the corrections.

    They have turned me down on help with my code.

    Thanks,

    Don

Latest Posts

Collapse

Topics Statistics Last Post
Started by bortz, 11-06-2023, 08:04 AM
47 responses
1,610 views
0 likes
Last Post aligator  
Started by jaybedreamin, Today, 05:56 PM
0 responses
9 views
0 likes
Last Post jaybedreamin  
Started by DJ888, 04-16-2024, 06:09 PM
6 responses
19 views
0 likes
Last Post DJ888
by DJ888
 
Started by Jon17, Today, 04:33 PM
0 responses
6 views
0 likes
Last Post Jon17
by Jon17
 
Started by Javierw.ok, Today, 04:12 PM
0 responses
21 views
0 likes
Last Post Javierw.ok  
Working...
X