Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Both screener and backtester are executed client side. Its very opensocial style of development. Also since this is private funded I dont have money for servers on server side.

Also for the non programmers...the applications can be made public so non programmers can use the public of applications.. Also the app developers like in opensocial can throw ads on the screeners.



Could you upload or paste a (complete) example backtest script?


The following code is for a backtester. I created the application on tickmarkt. It checks when an exponential moving average with 5 day lags crosses over the 10 day moving average and will open a trade. You might need a large time period for this to work or you can lower the lag and it will fire off sooner. I have some technical analysis indicators built into the system that I will soon open source as well.

here is some example backtester code:

var hasTrade = false;

function Init() { }

function Tick() { //5-day exponential moving average var ma5=analysis.Technical.ema('AAPL', 1 , 1 , 5 );

//10-day exponential moving average var ma10=analysis.Technical.ema('AAPL', 1 , 1 , 10 );

//invalid time data because of weekend if (ma5.length == 0 || ma10.length == 0) return;

if (ma5[0].value > ma10[0].value) { //open a trade if we dont have one if (hasTrade == false) {

      api.Broker.OpenTrade('AAPL', 
                           100,
               'open trade on cross'); 
     
     hasTrade = true;
   }
} else if (ma5[0].value < ma10[0].value) { //close a trade since we have one if (hasTrade == true) { api.Broker.OpenTrade('AAPL', -1100, 'close trade on cross');

      hasTrade = false;
   }
}

}

function Destroy() { }


can I email you at any particular address?


tickmarkt at gmail

Sorry Edit its tickmarkt not tickmark




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: