Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Message box inside Strategy

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

    Message box inside Strategy

    Can a Message box or some other technique be used to trigger manual events
    inside an automated strategy such as a messge box to go long and one to go short so the strategy can then place the order and programatically handle the stops. If anyone has an example of doing something similar I would appreciate it.

    Thanks

    ~J

    #2
    Hello JerryWar,

    Thank you for your post.

    There are some similar items out there, butnothing exactly as this.

    The following is an interface used to submit orders, I expect the logic would be similar to check for a condition and then call out for user input/manual input to take the actual position or place the order.

    Comment


      #3
      Kyle
      thanks, I used that and created a strategy to call something similar to the SampleAtmStrategy. The problem I am having is in modifying the Stops on the fly for the Template. I am using AtmStrategyChangeStopTarget() but do not know what the "Name" is such as "STOP1" in the example.

      Parameters limitPrice Order limit price
      stopPrice Order stop price
      orderName The order name such as "STOP1" or "TARGET2"
      AtmStrategyId The unique identifier for the ATM strategy

      protected override void OnBarUpdate()
      {
      AtmStrategyChangeStopTarget(0, SMA(10)[0], "STOP1", "AtmIdValue");
      }

      To make it slightly more complicated my ATM Template has 2 Stops and 2 Targets.
      So even though I have the AtmStrategyId from using the GetAtmUniqueID I can not reference and change the template Stops. Is there some default value or is there a way to specify when your do the ATMStrategyCreate.

      Thanks
      Jerry

      Comment


        #4
        Kyle
        Ignore that last message "STOP1" and "STOP2" work. I had two issues one was hiding the other.

        Thanks
        Jerry

        Comment


          #5
          Hello,

          Thank you for confirming this was solved.

          Please let me know if you need further assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by usazencort, Today, 01:16 AM
          0 responses
          1 view
          0 likes
          Last Post usazencort  
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          603 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          22 views
          0 likes
          Last Post xiinteractive  
          Started by Pattontje, Yesterday, 02:10 PM
          2 responses
          21 views
          0 likes
          Last Post Pattontje  
          Started by flybuzz, 04-21-2024, 04:07 PM
          17 responses
          230 views
          0 likes
          Last Post TradingLoss  
          Working...
          X