Ah, the magic of Bash!

for y in {1..30..7}; do
for x in {60..1}; do
DA=$(date -d "-$(($x+$y)) days" +%Y-%m-%d);
A=$(date -d "-$x days" +%Y-%m-%d);
echo -n "Simulazione per $y giorni da $DA a $A: ";
./zenbot.sh sim --strategy trend_ema_reversed --start $DA --end $A | grep "end balance" --after-context=2 |tr "\n" "\t"; echo "...";
done;
done |tee valutazione.txt

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.