• 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

B line

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

    B line

    Hello,
    In Tradestation I use an indicator, the B-line, which is a kind of LT stochastic indicator. Originally developed by Judy McKeigan ( Buffy) at dacharts.com.
    I'm not familiar with the Ninja program code. Therefore I have copied the TS code of the B-line.


    Input: Price(Close), Length1(35), Length2(10), Length3(1), OverBought(80), OverSold(20),
    MidColor(White),OBOSColor(Red);
    Variables: KFast(0), KFull(0), DFull(0), LL(O), HH(0);
    LL = Lowest((High+Low)/2, Length1);
    HH = Highest((High+Low)/2, Length1);
    KFast = 100 * IFF(HH-LL=0,0,(((High+Low)/2) - LL)/(HH- LL));
    KFull = Average(KFast, Length2);
    DFull = Average(KFull, Length3);
    If KFull <= 80 and KFull >= 20 then
    Plot1(KFull,"Stoc",MidColor,Default,2) else
    Plot1(KFull,"Stoc",OBOSColor,Default,2);
    Plot3(OverBought, "OverBought");
    Plot4(OverSold, "OverSold");

    I hope that someone can translate this into Ninja code.

    Jaap

    #2
    Hi Jaap,

    We have some new staff members that are ramping in supporting NinjaScript. I will assign this request as a training task for one of them. Give us a week or so to get this done.
    RayNinjaTrader Customer Service

    Comment


      #3
      What is DFull used for? Is it also plotted ?

      I put your code in an indicator, but it does not seem complete.

      TW

      Originally posted by Jaap8242 View Post
      Hello,
      In Tradestation I use an indicator, the B-line, which is a kind of LT stochastic indicator. Originally developed by Judy McKeigan ( Buffy) at dacharts.com.
      I'm not familiar with the Ninja program code. Therefore I have copied the TS code of the B-line.


      Input: Price(Close), Length1(35), Length2(10), Length3(1), OverBought(80), OverSold(20),
      MidColor(White),OBOSColor(Red);
      Variables: KFast(0), KFull(0), DFull(0), LL(O), HH(0);
      LL = Lowest((High+Low)/2, Length1);
      HH = Highest((High+Low)/2, Length1);
      KFast = 100 * IFF(HH-LL=0,0,(((High+Low)/2) - LL)/(HH- LL));
      KFull = Average(KFast, Length2);
      DFull = Average(KFull, Length3);
      If KFull <= 80 and KFull >= 20 then
      Plot1(KFull,"Stoc",MidColor,Default,2) else
      Plot1(KFull,"Stoc",OBOSColor,Default,2);
      Plot3(OverBought, "OverBought");
      Plot4(OverSold, "OverSold");

      I hope that someone can translate this into Ninja code.

      Jaap
      Last edited by twtrader; 08-01-2008, 04:09 PM. Reason: Deleted attachment

      Comment


        #4
        Hello Jaap,


        Thank you for your EasyLanguage to NinjaScript translation request.

        Your translated indicator is attached.

        Import instructions:
        1. Download the file contained in this thread to your PC desktop
        2. From the Control Center window, select the menu File > Utilities > Import NinjaScript
        3. Select the downloaded file
        twtrader,

        No, DFull is not plotted or used within the calculation, but I did translate it. DFull is probably a leftover from a variation of the indicator calculation. It can be eliminated from the code.
        Attached Files
        Last edited by NinjaTrader_Ben; 10-14-2008, 02:19 PM.
        BenNinjaTrader Customer Service

        Comment


          #5
          Hello Ben, Thank you very much for your quick and nice translation of the TS code.
          The Bline works great in Ninja Trader.

          Jaap

          Comment


            #6
            Originally posted by NinjaTrader_Ray View Post
            Hi Jaap,

            We have some new staff members that are ramping in supporting NinjaScript. I will assign this request as a training task for one of them. Give us a week or so to get this done.
            WOW, I'm really happy to hear this!

            Comment


              #7
              B-LINE indicator

              is it possible to modify this indicator to plot a one color when oversold and another color when overbought

              Comment


                #8
                I don't know. You should ask Ninja Trader Ben who has written this code.
                But you could differentiate the overbought line from the oversold line by giving them different colors.

                Jaap

                Comment


                  #9
                  Hello,

                  Over bought and over sold can be defined different ways so I put in 4 different colors splitting on 80, 50, and 20 to cover two different schools of thought.
                  Attached Files
                  Last edited by NinjaTrader_Ben; 01-07-2009, 08:16 AM.
                  BenNinjaTrader Customer Service

                  Comment


                    #10
                    bline

                    thanks Ben...the attached BLine indicator appears to be the same as the the original you had done..does the earlier one have to be removed before importing this one..
                    I am looking for a color change when over 80 and a different color when under 20 .the midline will be one color....
                    over 80... cyan
                    under20...red
                    21-79 ...yellow

                    Comment


                      #11
                      Hello,

                      I changed the attachment in my most recent post below. It is the BLine_MultiColor I intended to attach. It has more color changes and different colors than you requested but I suspect it will be sufficient.
                      BenNinjaTrader Customer Service

                      Comment


                        #12
                        bline multi

                        hi ben..the multi works great thanks again

                        Comment


                          #13
                          entire template

                          Buffy's entire template is available for Ninja. the indicators are attached, the chart template is sitting in dacharts where Buffy hangs out.
                          Attached Files

                          Comment


                            #14
                            Hi Newshues, your indicators look very nice. Great thanks to you and Ben.
                            There is only one drawback. The setup absorbs a great deal of computer power.
                            My normal setup with Ninja is 2 charts( CCI). That works great, but this morning I tried to install a third chart with Bline indicators. Ninja crashed and the third chart was not possible.

                            Jaap

                            Comment


                              #15
                              Jaap,

                              Please try loading less data per chart. Also, please see these other performance tips: http://www.ninjatrader-support.com/H...anceTips1.html
                              JoshNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by tgn55, Today, 08:57 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post tgn55
                              by tgn55
                               
                              Started by chartish, Today, 04:43 PM
                              1 response
                              10 views
                              0 likes
                              Last Post NinjaTrader_EricB  
                              Started by Trader17, Today, 04:07 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Trader17  
                              Started by GussJ, Today, 01:30 PM
                              2 responses
                              20 views
                              0 likes
                              Last Post GussJ
                              by GussJ
                               
                              Started by GARZONJ, Today, 12:25 PM
                              3 responses
                              18 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Working...
                              X