• 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

Entry after 2 signal loss in strategy

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

    Entry after 2 signal loss in strategy

    hi,
    if i've a strategy in execution...and i want to enter in a trade after 2 loss...

    how i do it?

    i have to record manually the enter and the exit or there is a method about it..

    thank

    #2
    Hello esignal,

    Can you further detail what you would like to accomplish?

    When you mention "enter in a trade after 2 loss" is this a loss of 2 ticks, or 2 points, or 2 concurrent trades that had negative PnL?

    When you mention "i've a strategy in execution" does this mean that the strategy has a position after an execution has taken place?
    (Meaning the trade has not been exited?)

    When you mention "i've a strategy in execution...and i want to enter in a trade" does this mean you want to further scale into an existing position? If you were long 1 you want to become long 2?

    When you mention "i have to record manually the enter and the exit or there is a method about it" are you asking if it is possible to automatically exit a trade after a certain amount of loss like a Stop Loss or a Profit Target?
    Yes, this would be possible by using SetStopLoss and SetProfitTarget().
    For example:
    SetStopLoss(CalculationMode.Ticks, 2);
    http://ninjatrader.com/support/helpG...etstoploss.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Sorry for my bad english...

      see pics :

      it's historical trade....
      i want to enter after 2 trade loss...

      I put an arrow where i want to entry signal.
      Attached Files

      Comment


        #4
        Thank you for clarifying esignal. The following condition will be true when you have lost two consecutive trades. Please let us know if there are any other ways we can help.

        Code:
        if ( SystemPerformance.AllTrades.Count> 1 && SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count-2].ProfitPoints > 0.0 && SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count-1].ProfitPoints > 0.0 )
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          two trade loss.....Do you wanted to write :

          ProfitPoints <0 ? (two trade in loss consecutive)
          ?
          Last edited by esignal; 03-13-2017, 08:09 AM.

          Comment


            #6
            To clarify this code, this is a test to see if your 2nd most recent trade, that is

            Code:
            SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count-2]
            And your most recent trade, that is

            Code:
            SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count-1]
            Both have positive profit values, that is

            Code:
            ... ..ProfitPoints > 0.0
            TradeCollections, like SystemPerformance.AllTrades, are documented here for more information.

            http://ninjatrader.com/support/helpG...collection.htm
            Last edited by NinjaTrader_JessicaP; 03-13-2017, 08:42 AM.
            Jessica P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by lomaduza, Yesterday, 11:46 PM
            0 responses
            4 views
            0 likes
            Last Post lomaduza  
            Started by jiknonikkocv, Yesterday, 11:23 PM
            0 responses
            4 views
            0 likes
            Last Post jiknonikkocv  
            Started by luxurious_04, 07-21-2019, 07:13 PM
            2 responses
            10 views
            0 likes
            Last Post luxurious_04  
            Started by swcooke, Yesterday, 07:35 PM
            0 responses
            5 views
            0 likes
            Last Post swcooke
            by swcooke
             
            Started by Miguel_88, Yesterday, 06:41 PM
            0 responses
            6 views
            0 likes
            Last Post Miguel_88  
            Working...
            X