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

Indicator value plot entry trigger

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

    Indicator value plot entry trigger

    Good morning, first post.
    I want to create a condition to go long or short based on what a specific Value Plot inside the indicator does.

    I want to go long if the choosen goes from any negative number to any positive number, after the current bar close, viceversa short.
    I need this to happen on a set time frame so I set the wanted tf into 'additional data'.

    I wrote on -imput- Indicator's parameter choosen then bool; should it be Int and rewriting default setting?
    On -conditions-
    Left panel: indicator and the value plot [greater] Right panel:Misc 'numeric value' 1
    Do the following Enter long position.

    Short: less than misc numeric value 0.

    Edit: Solved

    New issue:


    How I set the condition that after a Buy Signal I want to enter long at the break of the high?

    Click image for larger version

Name:	img.jpg
Views:	490
Size:	45.7 KB
ID:	1083581
    Last edited by mr_trader; 01-12-2020, 06:37 PM.

    #2
    Hello mr_trader,

    Welcome to the NinjaTrader forums!

    If you are looking for help with logic, this thread will remain open for any community members that would like to assist.

    If you are needing assistance with understanding a NinjaScript tool please let me know and I will be happy to assist.

    With your inquiry:
    'How I set the condition that after a Buy Signal I want to enter long at the break of the high?'
    It sounds like you want to know the Position.MarketPosition is MarketPosition.Long and the Close[0] of the current bar is greater than the High[0] of the previous bar, is this correct?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello mr_trader,

      Welcome to the NinjaTrader forums!

      If you are looking for help with logic, this thread will remain open for any community members that would like to assist.

      If you are needing assistance with understanding a NinjaScript tool please let me know and I will be happy to assist.

      With your inquiry:
      'How I set the condition that after a Buy Signal I want to enter long at the break of the high?'
      It sounds like you want to know the Position.MarketPosition is MarketPosition.Long and the Close[0] of the current bar is greater than the High[0] of the previous bar, is this correct?
      Good morning Chelsea, thanks for your reply.
      Let's take as an example the picture below, the system generated a sell signal on the n.1 arrow, and went correctly short after the bar close, on the immediate opening of the next bar as the arrow n.2.
      What I would like to do is to, in this case, enter short under the low of the bar that create the sell condition, at level n.3.

      Click image for larger version

Name:	img2.jpg
Views:	393
Size:	52.6 KB
ID:	1083630

      Kind Regards.

      Comment


        #4
        Hello mr_trader,

        What is the exact rule you would like written in out text?

        If the position is short 1 place a new order on the next bar update?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I would like to buy when price breaks the high of the bar who generated the long entry and I would like to sell when price breaks the low of the bar who generated the sell entry.
          I'm trying to do it with the wizard since I have 0 coding skills.

          Comment


            #6
            Hello mr_trader,

            When the long entry fills, save the high (High[0]) of the bar or the bar number (CurrentBar) to a variable.

            When the price (Close[0]) is greater than the saved high, call EnterLong().

            When the short entry fills, save the low (Low[0]) of the bar or the bar number (CurrentBar).

            When the price (Close[0]) is less than the saved low, call EnterShort().

            Below is a link to a forum post with helpful information about getting started with NinjaScript.
            https://ninjatrader.com/support/foru...040#post786040

            You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by PaulMohn, Today, 03:49 AM
            0 responses
            7 views
            0 likes
            Last Post PaulMohn  
            Started by inanazsocial, Today, 01:15 AM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by rocketman7, Today, 02:12 AM
            0 responses
            10 views
            0 likes
            Last Post rocketman7  
            Started by dustydbayer, Today, 01:59 AM
            0 responses
            4 views
            0 likes
            Last Post dustydbayer  
            Started by trilliantrader, 04-18-2024, 08:16 AM
            5 responses
            23 views
            0 likes
            Last Post trilliantrader  
            Working...
            X