Hey! Great idea! This is something I plan to incorporate in my front end as well. Unfortunately there's no one-size-fits all answer for your question. Combustion is complicated, and you may be able to get higher fuel economy at unintuitive engine speeds (ie, driving around everywhere at 1500rpm in every gear does not guarantee you'll get great economy). I suspect the algorithm you're talking about has to do with data tables in the ECU of automatic transmission vehicles that help determine when to shift for different performance levels. This sort of information isn't generally available ... the only useful info you can get from your car is in your driver's manual, which should tell you recommended shift points and limits.
Every person I know who owns a manual transmission determines when they shift for fuel economy empirically. Allow your user to decide when they'd like upshift/downshift cues or search the data on specific vehicles yourself. You may be able to collect and interpret OBD data to see if you can get shift points that result in the best fuel economy... but this is an open ended problem where you'd have to try and extract correlations and it's probably really difficult to do (though pretty interesting).