Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

To make a standard Fib setting as part of script

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

    #91
    I went over all of those items last night was a little lost on how to transfer all of that with my script then I settled in looked at this other script, FixedText and was able to get a lot of things done.

    All today I have been experimenting trying to be able to draw text line after line, could you show me a simple solution with what I already have so I can draw multiple text?

    1st screenshot is how it comes up, as far as working it works great, user can adjust font size, color background, they can remove instructions, put them to the left, right, top or where ever.
    looks like each one is behind the other.
    Click image for larger version

Name:	2024-12-12 13_44_33-Chart - 5m ETH.png
Views:	96
Size:	8.3 KB
ID:	1327580
    Click image for larger version

Name:	2024-12-12 13_45_06-NinjaScript Editor - Strategy - Channels.png
Views:	78
Size:	25.7 KB
ID:	1327581
    I tried to nest each one separate within the first logic block, went only as far as one.

    looks good in the strategy properties, all the functions work.
    Click image for larger version

Name:	2024-12-12 13_46_15-Strategies.png
Views:	80
Size:	21.8 KB
ID:	1327582

    Comment


      #92
      Hello trdninstyle,

      If the issue is the text is layered on top of each other, save all the text to one string, then call Draw.Text() once use that string.

      Use "/r/n" to add a return (new line) in between the text.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #93
        Hey ChelseaB,

        Thanks, I will try that. I've been using a one line like this: +"\nhello" + "\nhello" + "\n " and it's working well. Earlier I was trying where you stack those like this:

        "Line1",
        "\n\nLine2",
        "\n\n\nLine3",

        I could only get it to write the last line, I think it had to do with this part:

        if(Application == true && DrawTextPosition == TextPosition.BottomLeft || FontStyle == new Gui.Tools.SimpleFont("Consolas", 18) || FontColor == Brushes.Yellow || BackgroundColor == Brushes.Black || BackgroundColorOpacity == 100)

        I do have it working with one line though. I read where I could change the appearance or something by placing a t instead of the n, something like that? I'm interested in trying "/r/n" so many cool things we can do with this stuff lol

        Thanks for getting back to me I'll follow up with you on the morrow..
        Last edited by trdninstyle; 12-18-2024, 07:38 AM.

        Comment


          #94
          Hello ChelseaB,

          I replaced +"\n" with +"r\n" , I know you didn't say to put the plus sign in front but I did. But it made it so I could see that "r\n".
          If it's the same result I can just keep +"\n" thats working.
          Click image for larger version

Name:	2024-12-18 08_46_54-2024_12_18_08_45_20_NinjaScript_Editor_Strategy_Channels.png - Paint.png
Views:	71
Size:	14.0 KB
ID:	1328287

          How would I separate these choices? Right now if I click on all 3 the last one shows, you would only click one, the one you would want to see. But some ppl may not understand that & hit all 3.
          Click image for larger version

Name:	2024-12-18 09_00_16-Strategies.png
Views:	70
Size:	2.4 KB
ID:	1328288 Click image for larger version

Name:	2024-12-18 09_07_24-NinjaScript Editor - Strategy - Channels.png
Views:	67
Size:	25.8 KB
ID:	1328289

          Comment


            #95
            Hello trdninstyle,

            You are trying to hide or disable inputs based on the value of another input?

            See the reference sample that demonstrates this.
            Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #96
              Thank you for this, I apologize for being so, can't think of the word but having to ask on every little thing.

              From all of these choices am I correct on saying I want.. region Use Case #1: Show/hide properties based on secondary input ? It sounds like it just want to have the right one.
              Click image for larger version

Name:	2024-12-18 09_45_51-NinjaScript Editor - Indicator - SampleIndicatorTypeConverter.png
Views:	75
Size:	37.6 KB
ID:	1328301
              Because I could also want.. region Use Case #3: Re-implement a "bool" checkbox as a combobox
              Click image for larger version

Name:	2024-12-18 09_51_57-NinjaScript Editor - Indicator - SampleIndicatorTypeConverter.png
Views:	61
Size:	27.9 KB
ID:	1328302

              I would only need the ones I have in a square, right? For case # 1
              Click image for larger version

Name:	2024-12-18 09_56_49-2024_12_18_09_53_14_NinjaScript_Editor_Indicator_SampleIndicatorTypeConverter.pn.png
Views:	67
Size:	15.9 KB
ID:	1328303
              I still need to use the private shown here regardless which one I go by, correct? It just covers them all.
              Click image for larger version

Name:	2024-12-18 10_03_07-NinjaScript Editor - Indicator - SampleIndicatorTypeConverter.png
Views:	66
Size:	19.4 KB
ID:	1328304

              Comment


                #97
                Hello trdninstyle,

                If you want to hide or show inputs based on the value of another input, this would be the regions 'Use Case #1: Show/hide properties based on secondary input'.

                If you want to show a bool (a true or false) as a drop-down instead of as a checkbox this would be the regions 'Use Case #3: Re-implement a "bool" checkbox as a combobox'.

                The collectionDefaults and myListValues variables are used for regions 'Use Case #5: Display a custom collection/list with user defined values at run time'.

                Note, using TypeConverters is advanced and will require an advanced understanding of C#.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #98
                  Okay, very good and thank you, so I don't need a private value then for 'Use Case #1:

                  I like that true or false drop-down option for when it fits.

                  Comment


                    #99
                    Actually I don't want to hide it like this;
                    Click image for larger version

Name:	2024-12-18 12_10_33-Indicators.png
Views:	69
Size:	3.2 KB
ID:	1328349
                    I want to keep these opened as displayed,
                    Click image for larger version

Name:	2024-12-18 12_48_48-To make a standard Fib setting as part of script - NinjaTrader Support Forum - D.png
Views:	63
Size:	4.5 KB
ID:	1328350
                    Would I place a else if in between each one of these? Or just leave it as is and they can figure it out.
                    Click image for larger version

Name:	2024-12-18 12_52_54-NinjaScript Editor - Strategy - Channels.png
Views:	63
Size:	15.8 KB
ID:	1328351



                    Comment


                      Hello trdninstyle,

                      This depends on the logic you want.

                      Do you only want to evaluate the second condition if the first condition is false?
                      Do you want to only evaluate the third condition if both the first and conditions are false?
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        Out of the 3 conditions only one would be true at a time.

                        The first one is a general guideline to review, for a strong channel.

                        The next two is a cheat sheet that takes little space to the left that they review as you trade or practice replay then -5% out of 90% for every item thats not on that list, like that doji on the chart but it closed above prior bars H, so it printed strong but more of a 80% because of the lower tails but it's more reliable due to it's the first one coming off from exhaustion.
                        Click image for larger version  Name:	2024-12-18 13_16_41-Chart - 5m ETH.png Views:	0 Size:	56.5 KB ID:	1328360
                        I regress; they would switch from the bull channel list to the bear channel list in the indicator window.


                        What would be more convenient is to have that push button you showed me last week on the chart, allowing a switch from Bull to Bear as conditions rapidity change.

                        But just in case that learning curve for the push button takes me longer, how would I display the else if for the condition to be true out of three?

                        Comment


                          Hello trdninstyle,

                          When using separate branching commands (if statements) each one would be evaluated independently. If the first branching command is true, the other two can also still evaluate as true.

                          When combining the branching commands using else-if statements, the else-if will only evaluate if the previous if or else-if evaluated as false. Meaning if the first branching command is true, the else-if branching commands will not be evaluated.

                          Below is a link to an educational site on else-if.
                          W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            Could you please give me that push button item again? I had it messed up and I want to import it again.

                            This is the one I'm referring to:
                            Click image for larger version

Name:	2024-12-19 12_02_53-Chart - 5m ETH.png
Views:	72
Size:	14.9 KB
ID:	1328557

                            Also, I should make sure that this is what I need, here's what I want to do:

                            To first of all click from the indicator window to show the switch button on the chart then have it switch from the bullish cheat sheet to the bearish cheat sheet.

                            To flip back and forth with these two similar items:
                            Click image for larger version

Name:	2024-12-19 12_17_42-Chart - 5m ETH.png
Views:	66
Size:	14.4 KB
ID:	1328558 Click image for larger version

Name:	2024-12-19 12_18_38-Chart - 5m ETH.png
Views:	69
Size:	13.7 KB
ID:	1328559

                            Thank you, I went back but I keep finding the one for taking trades.

                            Comment


                              Hello trdninstyle,

                              The link was provided in post # 88.
                              Chelsea B.NinjaTrader Customer Service

                              Comment


                                Thank you, I was not seeing the link at the top left, dah, then I saw it. My bad.

                                I am using CandleOutlineBrushes, but I do not necessarily like how it also colors the wicks. In the data series, we can color the body and wicks separately. Is it possible to color only the candle body? To create something.

                                Click image for larger version

Name:	2024-12-20 11_12_50-NinjaScript Editor - Strategy - Channels.png
Views:	58
Size:	34.4 KB
ID:	1328708
                                Attached Files
                                Last edited by trdninstyle; 12-20-2024, 10:27 AM.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by NullPointStrategies, Yesterday, 05:17 AM
                                0 responses
                                65 views
                                0 likes
                                Last Post NullPointStrategies  
                                Started by argusthome, 03-08-2026, 10:06 AM
                                0 responses
                                139 views
                                0 likes
                                Last Post argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                75 views
                                0 likes
                                Last Post NabilKhattabi  
                                Started by Deep42, 03-06-2026, 12:28 AM
                                0 responses
                                45 views
                                0 likes
                                Last Post Deep42
                                by Deep42
                                 
                                Started by TheRealMorford, 03-05-2026, 06:15 PM
                                0 responses
                                50 views
                                0 likes
                                Last Post TheRealMorford  
                                Working...
                                X