Created
July 14, 2009 19:38
-
-
Save chuckremes/147134 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def write_file filename | |
File.open(filename, "w") do |file| | |
file.puts "#\tSUMMARY" | |
file.puts "#\tWINNER%\tPRODUCT\tDURATION\tPROFIT GOAL\tTIME\tAVG PROFIT\tAVG RISK\tBREAKOUT%\tRISK RATIO\tAVG ENTRY\tAVG EXIT\tAVG MAX EXIT\tAVG DRAWDOWN" | |
winner_summary.each do |line| | |
file.puts("#\t" + line.join("\t")) | |
end | |
file.puts "#\tLOSER%\tPRODUCT\tDURATION\tPROFIT GOAL\tTIME\tAVG PROFIT\tAVG RISK\tBREAKDOWN%\tRISK RATIO\tAVG ENTRY\tAVG EXIT\tAVG MAX EXIT\tAVG DRAWDOWN" | |
loser_summary.each do |line| | |
file.puts("#\t" + line.join("\t")) | |
end | |
file.puts | |
file.puts | |
file.puts "#DATE\tTIME\tPRODUCT\tDURATION\tSTOP TICKS\tSLIPPAGE\tHIGH\tLOW\tRISK\tSIDE\tPROFIT GOAL\tPROFIT GOAL LOCK%\tENTRY TIME\tPROFIT\tSCALP TIME\tMAX PROFIT\tSCALP TIME\tMA | |
X DRAWDOWN" | |
sorted.each do |line| | |
file.puts(line.join("\t")) | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment