• 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

Set TriggerPrice / Set TriggerState

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

    Set TriggerPrice / Set TriggerState

    Hello

    can somebody direct me to where I can find information on Set TriggerPrice and Set TriggerStop

    I am working with a break even stop from this forum see link below

    https://ninjatrader.com/support/foru...rategy-builder

    It uses the strategy builder with those functions but I cannot find any documentation explaining the parameters or how exactly they are used.

    Thank you

    Stefan

    #2
    Hello sdauteil,

    Thank you for your post.

    Are you referring to the BreakEvenBuilderExample?

    TriggerState, TriggerPrice, and StopPrice in that example are simply variables that are manipulated by the strategy.

    Here's where those variables are initialized in the Strategy Builder:

    Click image for larger version

Name:	2019-06-14_1254.png
Views:	28
Size:	78.0 KB
ID:	1060814

    And then they are used as parts of conditions and values for them are updated here in the conditions and actions, for example here:

    Click image for larger version

Name:	2019-06-14_1257_001.png
Views:	25
Size:	88.8 KB
ID:	1060815

    As we can see, these variables are set as the Average Position Price, + the number of ticks specified by the InitialStopDistance and BreakEvenTrigger user inputs.

    Thanks in advance; I look forward to assisting you further.

    ​​​​​​​
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thank you for the help

      I am trying to figure out the function of the Set TriggerPrice and Set TriggerState that is under the Misc box that comes up when you edit the TriggerPrice line in the action box.

      I looked at the code and I couldn't find this function nor could I find it in the help files.




      Click image for larger version

Name:	Set Trigger Price.JPG
Views:	31
Size:	102.4 KB
ID:	1060862


      Comment


        #4
        Hello sdauteil,

        Thank you for your post.

        "Set TriggerPrice" in the Misc box basically means "TriggerPrice =" whatever value you choose for that box. It is used to reassign the value of that variable to whatever you choose.

        In the case of your screenshot, it's currently being reset to the Current Average Position Price plus the number of ticks away from breakeven you wish multiplied by the ticksize, which is the dollar amount of each tick.

        Please let us know if we may be of further assistance to you.


        Kate W.NinjaTrader Customer Service

        Comment


          #5
          One more question

          If I use the set profit target feature in the strategy builder (1st picture) the break even function will no longer trigger.

          The Break even function does work If I set the profit target in the action window (2nd picture) but if the profit target is hit the position doesn't close until the candle in which the profit target was hit closes.

          Basically I would like the closing order when the profit target is hit to fill immediately. I tried market if touched but that didn't seem to work either.

          I appreciate the help...

          Click image for larger version

Name:	Profit Target.JPG
Views:	28
Size:	63.3 KB
ID:	1061040Click image for larger version

Name:	Strategy Target.JPG
Views:	27
Size:	81.6 KB
ID:	1061041








          Comment


            #6
            Hello sdauteuil,

            Thank you for your reply.

            You would not be able to use the Stops and Targets screen to set a stop loss that would move to breakeven. You would have to use logic in a similar fashion as the example to create a breakeven using Exit methods.

            What is your strategy set to calculate on? OnBarClose will cause your exit orders to be executed after the current bar closes. To have these orders trigger intrabar, you need to set the calculation mode to OnPriceChange (recommended) or OnEachTick (uses more PC resources).

            Here's a link to our help guide that goes over the associated screen in the Strategy Builder:
            https://ninjatrader.com/support/help...lculation+mode

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by catinabag, Today, 06:45 PM
            0 responses
            1 view
            0 likes
            Last Post catinabag  
            Started by darkgreen, Today, 03:35 PM
            0 responses
            7 views
            0 likes
            Last Post darkgreen  
            Started by GTBrooks, Today, 02:44 PM
            3 responses
            14 views
            0 likes
            Last Post GTBrooks  
            Started by GLFX005, Today, 12:22 PM
            4 responses
            41 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by AspenHiker, Today, 08:37 AM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_Kate  
            Working...
            X