Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to sell limit on the moving average

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

    how to sell limit on the moving average

    Hi, i'm constructing a script based on the moving average, basicly, when 2 moving average cross to the upside buy... but i don't want to buy at the market (EnterLong) but after a pull back on the fast moving average... i tried to write a EnterLongLimit like that but it doesn't work :

    EnterLongLimit (1, SMA(21), "Entry Long")

    i want than my limit order moves with the fast moving average...

    how can i do ?
    thx for answers

    #2
    Hi Thomas, could you tell me what error message you're getting?

    Just a quick guess, but could you also try EnterLongLimit(1, SMA(21)[0], "Entry Long")?
    AustinNinjaTrader Customer Service

    Comment


      #3
      The error code is CS1502 and CS1503

      i already tried to write EnterLongLimit(1, SMA(21)[0], "Entry Long") but the problem is that the order don't move up with the moving average, i mean that the order is fill only if the market hit the moving average during the [0] period... but if the market hit the moving average 2, 3, 4 periods after, the moving average rose but not the order. that's my problem

      Comment


        #4
        Thomas, I think I might have an idea as to why it is not trailing, but to test my theory, I'd need to see the relevant sections of code. Could you please post the code? You could just email it to [email protected] attn Austin if you'd like.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by moehsan, Yesterday, 09:47 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by BraisedInBlue, Today, 06:43 AM
        0 responses
        6 views
        0 likes
        Last Post BraisedInBlue  
        Started by AaronKoRn, Today, 06:28 AM
        0 responses
        3 views
        0 likes
        Last Post AaronKoRn  
        Started by pjsmith, Today, 01:00 AM
        1 response
        13 views
        0 likes
        Last Post NT-Roland  
        Started by alejandro888, Yesterday, 08:41 PM
        0 responses
        9 views
        0 likes
        Last Post alejandro888  
        Working...
        X