• 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

Indicator and steategy (dll) together ?

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

    #16
    Originally posted by marynja View Post
    I think no, because if i pass the value of the indicators enum object all work correclty, for example:

    Add(myIndicator(myEnum.One);

    but if i pass the strategy enum object the error is launched :

    Add(myIndicator(aSelectableValue);

    And i dont understand because aSelectableValue is a enum object too...
    Is aSelectableValue defined as being of myEnum?

    Comment


      #17
      Hello koganam, i upload the .cs of the indicator (NEWSMA) and the strategy (myStrategy).

      Please, look myStrategy.cs:

      If i Add the indicator enum value all work

      If i Add the strategy enum dont work... why?

      Thank you a lot !
      Attached Files

      Comment


        #18
        Creatin strategy with two indicators

        hello, Can anyone help me to create an strategy combining 2 indicators... autodivergence macd indicator(d3spotterv3 when detects a divergence sends alert and command to autofibo to draw fibo between hi and low of the divergence, the set up an buy/sell order on 23,8%+2pips with tp on 38,2% fibo-2pips. and stop loss0% fib-5pip. condition : if price breaks 0% without reaching 23,8 fib then order canceled and wait for next divergence

        please does anyone know if this is possible ???

        best

        Comment


          #19
          Originally posted by marynja View Post
          Hello koganam, i upload the .cs of the indicator (NEWSMA) and the strategy (myStrategy).

          Please, look myStrategy.cs:

          If i Add the indicator enum value all work

          If i Add the strategy enum dont work... why?

          Thank you a lot !
          The fact that you have defined myEnum and esEnum to have the exact same members does not make them equivalent types: they have absolutely no relationship to each other.

          When you add the indicator to anything, you must pass it with the correct parameters. As you are polluting the global namespace with your myEnum definition, myEnum is available to all classes. Just define your parameter in the Strategy to be of type myEnum.
          Last edited by koganam; 11-20-2014, 11:39 AM. Reason: Corrected spelling.

          Comment


            #20
            Originally posted by PEPBOSCH View Post
            hello, Can anyone help me to create an strategy combining 2 indicators... autodivergence macd indicator(d3spotterv3 when detects a divergence sends alert and command to autofibo to draw fibo between hi and low of the divergence, the set up an buy/sell order on 23,8%+2pips with tp on 38,2% fibo-2pips. and stop loss0% fib-5pip. condition : if price breaks 0% without reaching 23,8 fib then order canceled and wait for next divergence

            please does anyone know if this is possible ???

            best
            It is possible to code it, yes. But what you have described is rather elaborate. You may have to hire someone to code it: I kind of doubt that you are going to get that done for free.

            Comment


              #21
              Originally posted by koganam View Post
              myEnum is available to all classes. Just define you parameter in the Strategy to be of type myEnum.
              Thank you koganam ! i am trying but i can find solution. Please, could you send me a code example of the stratey?

              Thanks !!

              Comment


                #22
                Originally posted by marynja View Post
                Thank you koganam ! i am trying but i can find solution. Please, could you send me a code example of the stratey?

                Thanks !!
                Code:
                            private esEnum aSelectableValue    = esEnum.Ten;
                should be
                Code:
                             private myEnum aSelectableValue    = myEnum.Ten;
                after which, you have to expose the property correctly.
                Code:
                            [Description("Select Period")]
                            [GridCategory("Select Period")]
                            public esEnum mySelect{
                                get { return aSelectableValue ; }
                                set { aSelectableValue  = value; }
                            }
                should be
                Code:
                             [Description("Select Period")]
                            [GridCategory("Select Period")]
                            public myEnum mySelect{
                                get { return aSelectableValue ; }
                                set { aSelectableValue  = value; }
                            }

                Comment


                  #23
                  The error was solved thnak you. the key was this declaration

                  private myEnum aSelectableValue = myEnum.Ten;

                  Thank you very much koganam and NT Support.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by mohdhm, Today, 04:09 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post mohdhm
                  by mohdhm
                   
                  Started by BGWTEX, Today, 03:30 PM
                  1 response
                  3 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by marekflys, Today, 03:07 PM
                  0 responses
                  5 views
                  0 likes
                  Last Post marekflys  
                  Started by GregoryBaskin, Today, 02:51 PM
                  1 response
                  4 views
                  0 likes
                  Last Post NinjaTrader_Tyler  
                  Started by swcooke, Today, 12:33 PM
                  1 response
                  11 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Working...
                  X