Australian (ASX) Stock Market Forum

What does this code do?

xxx

Joined
21 October 2016
Posts
31
Reactions
0
Could someone explain what this code does?

Index = Foreign(".NDX","C", True);
IndexMAoptimized = Optimize("IndexMAoptimized", 1,1,12,1);
IndexMA = MA(Index, IndexMAoptimized);
 
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.
 
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.

Thank you for your help!
 
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 :)
 
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
 
Top