Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Code for 1 Trade

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

    Code for 1 Trade

    Hello.

    I have a strategy , that is based on Cross's and DBBS . The thing i want but i cant seem to be able to do it is put on the Strategy, that it can only do 1 Trade PER cross.

    Exemple:

    - Emas Cross + Zone of DBBS to sell -> Open sell.
    (this i made it work)

    the problem is after the Target is achived, he keeps make more trades... I want that the strategy wait for the next Cross, to make a New trade. All i did was in wizzard, so if possible, could some 1 tell me exactly what Code line i need to add and wher?

    Thank you guys

    #2
    Hello PauloP,

    Thank you for writing in.

    What I would suggest is the use of the built-in user defined variables. With these, you can keep track of when conditions occur and have events only occur if this variable is a specific value.

    I have provided a video demonstrating the use of user defined variables within the Strategy Wizard: http://screencast.com/t/x2LsrBGhI6

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thanks alot ZacharyG ! Excelent help

      Comment


        #4
        Originally posted by NinjaTrader_ZacharyG View Post
        Hello PauloP,

        Thank you for writing in.

        What I would suggest is the use of the built-in user defined variables. With these, you can keep track of when conditions occur and have events only occur if this variable is a specific value.

        I have provided a video demonstrating the use of user defined variables within the Strategy Wizard: http://screencast.com/t/x2LsrBGhI6

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

        I just have 1 Doubt.... around 0.58, you have at the 1 rectangle, Variable0 == 1 , when i go try the same, i dont have a option "1" anywher. I'm doing something Wrong?

        Comment


          #5
          Hello PauloP,

          To set that condition up, follow the instructions below:
          1. In the Condition Builder, select User variables -> Variable0 in the first column
          2. Ensure that == is selected for the center comparison column
          3. Select Misc -> Numeric value


          Please, let us know if we may be of further assistance.
          Zachary G.NinjaTrader Customer Service

          Comment


            #6
            1 more time! Thanks alot

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            574 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            331 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            550 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X