• Australian (ASX) Stock Market Forum

What does this code do?

Discussion in 'Software and Data' started by xxx, Oct 26, 2016.

  1. xxx

    xxx

    Posts:
    31
    Likes Received:
    0
    Joined:
    Oct 21, 2016
    Could someone explain what this code does?

    Index = Foreign(".NDX","C", True);
    IndexMAoptimized = Optimize("IndexMAoptimized", 1,1,12,1);
    IndexMA = MA(Index, IndexMAoptimized);
     
  2. Gringotts Bank

    Gringotts Bank

    Posts:
    5,300
    Likes Received:
    69
    Joined:
    Jun 30, 2007
    In English,

    Regarding the Nasdaq Index closing price (".NDX", "C"), what period's parameter is optimal for the moving average applied to this same symbol?

    On it's own it does nothing. It's a code snippet. You'd use it as some sort of filter.
     
  3. xxx

    xxx

    Posts:
    31
    Likes Received:
    0
    Joined:
    Oct 21, 2016
    Thank you for your help!
     
  4. MickStanciu

    MickStanciu

    Posts:
    4
    Likes Received:
    0
    Joined:
    Oct 21, 2016
    Index is an array with CLOSE prices of NDX symbol (ticker)
    IndexMAoptimized would be a number from 1...12 while running optimizer, default to 1
    IndexMA is a simple moving average (SMA) of Index and this number 1...12.

    Is awkward to optimize a SMA from 1 ... but ... not my code :)
     
  5. howardbandy

    howardbandy

    Posts:
    838
    Likes Received:
    84
    Joined:
    Jun 13, 2007
    Greetings --

    Using a more descriptive title for the original post will help draw attention from the experts you are looking for. Include the development platform the code will run in. This appears to AmiBroker code. If it is, there is already a very active AmiBroker thread. Post the question there.

    Best, Howard
     
Loading...

Share This Page