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

Draw symbol on price chart?? How??

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

    Draw symbol on price chart?? How??

    Hello,

    I want to develop a simple strategy of some ema crossovers for forex, when they occur I want to draw a symbol - say an red down arrow on the screen to indicate that a short side trade might be developing for me after the crossover - how do I display the symbol on the chart at the point of this ema crossover? Also, want to display a horizontal line in the chart about 10 pips above or below this crossover to indicate entry point for a trade? I don't want ninja to execute a trade, just want to show it on the chart so I can judge for myself whether to place a trade or not.

    #2
    Hi jimwolfe,


    There's a great tutorial on crossovers at - http://www.ninjatrader-support.com/H...OverConditions

    Similarly, on drawing from a strategy using the wizard - http://www.ninjatrader-support.com/H...rawingOnAChart

    Additionally, every other week there is a webinar titled "Automated Strategy Development Level 1". Please see the link in my signature for more information and a full schedule of events.
    TimNinjaTrader Customer Service

    Comment


      #3
      Backtesting

      Hi Tim,

      Thanks, I will review the links you sent and attend the webinar - are there recorded versions of past webinars to view? Also, once I get the strategy built, can I run it against say my 15 days of historical data on the forex price charts to test it to see if the symbols displayed on the charts in the proper places - based on historical data?

      Thanks,
      Jim

      Comment


        #4
        Hi jimwolfe,

        Unfortunately, they are not recorded.

        You can apply a strategy to a chart via the right click menu, then enable in the Strategies tab of the Control Center.

        More info at - http://www.ninjatrader-support.com/H...tegiesOnCharts
        TimNinjaTrader Customer Service

        Comment


          #5
          Adding ADX value

          Hi Tim,

          I think I have the EMA cross and symbols working, I want to add one more parameter - I want the ADX 14 value to be rising up, and that is was below or equal to 20 in the past 5 bars - the code doesn't seem to be working for me?
          Thanks!

          Comment


            #6
            Hi jimwolfe,

            For the rising condition, please see the first screenshot.

            For the "below or equal to 20 in the past 5 bars " condition, we would normally use CountIf(), but that would require you to unlock the code and enter manually.

            More info at - http://www.ninjatrader-support.com/H...e.html?CountIf

            You could still do this with the wizard, but it would require multiple sets of conditions where ADX(14)[0] > 20, then ADX(14)[1] > 20, etc.
            TimNinjaTrader Customer Service

            Comment


              #7
              ADX rising

              Hi Tim,

              You reference the first screenshot for ADX rising, I don't see a screenshot?

              Comment


                #8
                Jim, please check for example the attached for a sample condition.
                Attached Files
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Email signal

                  Thanks, the ADX rising advice worked nicely! Now I need to add an email signal,which I have done, but if I have the strategy running on several currency par charts at the same time, how do I set the email signal to identify the currency par from the chart it is on, meaning if I have the strategy running on a EUR/USD 5 min chart and at the same time have it running on a GBP/JPY 5 min chart and the strategy fires on the EUR chart, I want to receive an email that tells me the strategy fired on the EUR chart, and not the GBP chart, can I do this?

                  Thanks,
                  Jim

                  Comment


                    #10
                    Hi jimwolfe,

                    Two options...

                    1. You can add either...

                    Instrument.FullName
                    or
                    Instrument.MasterInstrument.Name

                    to the subject or text of the email, however, you would first need to unlock the code, otherwise the wizard automatically inserts quotations.

                    2. You can create two (or several) version's of the strategy and put the name of the instrument you are applying it to in the subject or text.
                    TimNinjaTrader Customer Service

                    Comment


                      #11
                      Email

                      Hi Tim, Thanks, but as a newbie, can you show me what the sendmail line of code will look like with the instrument name in there?

                      Thank,
                      Jim

                      Comment


                        #12
                        Hi

                        After unlocking the code, you could do something like.

                        Code:
                        SendMail("[email protected]", "[email protected]", "Trade Alert", Instrument.FullName);
                        More info at - http://www.ninjatrader-support.com/H...html?SendMail1

                        and - http://www.ninjatrader-support.com/H...rumentFullName
                        TimNinjaTrader Customer Service

                        Comment


                          #13
                          Email signal

                          Thanks - again!! Will this display the actual pair name? ie. EURUSD or will is display as ES 03-10?

                          Comment


                            #14
                            Hi jimwolfe,

                            For the $EURUSD...

                            Instrument.FullName will display "$EURUSD"
                            Instrument.MasterInstrument.Name will display "EURUSD'
                            TimNinjaTrader Customer Service

                            Comment


                              #15
                              Email

                              Thanks! That will work.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by aa731, Today, 02:54 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post aa731
                              by aa731
                               
                              Started by thanajo, 05-04-2021, 02:11 AM
                              3 responses
                              470 views
                              0 likes
                              Last Post tradingnasdaqprueba  
                              Started by Christopher_R, Today, 12:29 AM
                              0 responses
                              10 views
                              0 likes
                              Last Post Christopher_R  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              166 responses
                              2,237 views
                              0 likes
                              Last Post sidlercom80  
                              Started by thread, Yesterday, 11:58 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post thread
                              by thread
                               
                              Working...
                              X