Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Coding a Variable

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

    Coding a Variable

    I would like to generate a variable based on two stock prices to use in my order entry.

    Instead of EnterShort(Default) I want it to EnterShort(myVariable)

    How do I code in Ninja Script the formula for a variable:
    (Price of Stock A/Price of Stock B)= myVariable

    I have very limited C# experience.

    #2
    Hi vt2009,

    This would require using a multi-instrument strategy.

    http://www.ninjatrader-support.com/H...ameInstruments

    This will also be available in indicators with the release of NinjaTrader 7.
    More on NT7 - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html
    TimNinjaTrader Customer Service

    Comment


      #3
      This seems to be the link I am always given...is there an example of myVariable code I could look at? Its really simple I'm sure

      Comment


        #4
        Hi vt2009,

        Unfortunately, I don't have a specific sample available for this specific topic, however there is also a sample Strategy loaded by default in NinjaTrader if you want another example of the use of multi-instrument strategies.

        (Tools>Edit NS>Strategy>SampleMultiInstrument)
        Last edited by NinjaTrader_Tim; 03-24-2010, 07:50 AM.
        TimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by omermirza, Today, 12:39 PM
        0 responses
        5 views
        0 likes
        Last Post omermirza  
        Started by larkmail, Today, 12:30 PM
        0 responses
        5 views
        0 likes
        Last Post larkmail  
        Started by Danila, Today, 11:08 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by dbida001, Today, 10:31 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by Brandon9821, Today, 08:27 AM
        3 responses
        29 views
        0 likes
        Last Post Brandon9821  
        Working...
        X