getting more data from optimisations, and generating graphs

 

Hi im new here. first of all, just wanted to say thanks to this comunity, youve allready helped me a lot from just reading passed thread.

is there a way to gather data, like any variable inside my code, from each pass and then output it to the result table, or at least print it on the journal with its pass number. I know you can use the custom max to get one parameter, but i would like to get more than one at a time if posible and still optimise to something else.

also is it possible to when there is only one optimisation parameter, have the output graph have the input parameter on the y axis instead of the pass number,since it does it a bit random because of multiple agents (i guess), and if it was 2 parameters it could be a grid formed by the 2 inputs where the lighter (or greener or what ever) the cell the better the result for the 2 coresponding input values of that cell.

im fairly new to programing, but staring to get my head around it, just need some pointers if any one has any ideas, if i could just get mql5 to generate a txt file with the data i whant it would prably be quite easy to find a way to turn that in to a graph i would imagin, just would be nice to do it from in side of MT5, 

thanks in advance