Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetProfitTarget and get current time.

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

    SetProfitTarget and get current time.

    Hallo. Have two questions.
    1. What is the code representing realized profit. I would like to hold strategy (do not place orders) for e.g. for half hour if the realized profit will be bigger than for e.g. 200$ .

    2.How to save time of order place or exit to variable?? What is the code representing current time?

    Rgds Czarek
    Last edited by Czarek; 07-25-2009, 03:43 AM.

    #2
    Hello,

    What you can do with performance information is listed here:



    You will need to track the realized profit by recording the entry price, etc. I believe this will be included in NT7 though...

    I'm not sure I understand your second question. You can get the current time via:

    Get order information via:
    Last edited by NinjaTrader_Ben; 07-25-2009, 08:25 PM.
    DenNinjaTrader Customer Service

    Comment


      #3
      Hello Ben.
      I would like to hold strategy work (do not place any orders) for half hour when the strategy reach e.g 400$ realized profit or get stop loss. To do this, I would like to save ExitOrder time to variable then add 30 min (+1800) and let the strategy work again. The main problem is how to save the Exit time??

      Rgds
      Czarek.

      Comment


        #4
        Hello,

        You can get it by using DateTime.Now as seen in the second to last link I provided, or you can use IOrder and something like myorder.Time per the last link I provided below.
        DenNinjaTrader Customer Service

        Comment


          #5
          Hi,
          How should I create variable to save the execution time??
          I try to use myorder.Time or execution.Order.Time but in the way I can save AvgFillPrice
          I can't save Time.

          Comment


            #6
            Hello,

            You will want to use delcare it as DateTime. Try this to see what you are working with:

            DateTime timetester = DateTime.Now;
            Print(timetester);

            DenNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,406 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            98 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            8 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            160 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            9 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X