Hi, above is a back test result. However, i don't know why the max drawdown is weird as large as -1000000000099300. in my historical data, i do have some empty bars. it is caused by empty bars issue? and how to overcome this?? many thanks!
in my AFL, at the very begining, i did something like 1) O=O[i-1]; 2) H=H[i-1]; 3) L=L[i-1]; 4) C=C[i-1]; to make sure that the empty bars are replaced by previous bar and in exploration, i print out them to excel and double checked that, they are all sensible number without any empty element. in back test, all round trades are reasonable so i guess when the Amibroker calculate the max draw down, it use something external formula and use the original chart to calculate, that's why the weird value resulted. do you think i am correct?
That's is BS code. You just assign scalar to array. What do you mean by empty bars??? If you have junk data in your data file then just clean your data file in the first place. Or you have imported the data wrongly. Go to AmiBroker. They may help you if you provide more info other than almost no concrete info as currently in this game show..
Originally i want to type o=o[i-1], but here it automatically chopped it. I assigned element to element. Sometime low liquidity product may hv empty bar, so i need to equal it to previous bar before doing testing
I believe the norm for this is to delete the empty bars, and have some sort of reference symbol with complete data for the time period and use the pad and align options in amibroker. Depending on where this data originates from you could assign the blank values in Excel first then import.