Quote from intradaybill:
Then post the results looney. What is holding you back? Maybe a few errors at the end. Or maybe you do not want anyone else to try your two line code? You think people are stupid here?
Go ahead moron and post the last ten trades to 07/06/2012 so everyone can see the problem with your sh*t. You are spending time typing non-sense loony when you could just post the results and the code. You should be ashamed of yourself for what kind of degenerate personality you are.
Again, if you do not post the results, it means the code has problems and that is why you are not posting it.
I have never met anyone as sick and abrassive as you are in these threads. You blew a small point out of proportion and you would not have done that unless that effected you personally. So everyone realizes what is involved here.
Post the code and results or hide away loony. Put your head in the sand and hide away.
So now the real lunatic is coming out of the closet, right? Hahaha
Are you hitting your head against a wall right now? Because it feels like that.
You didn't want to provide your code example but you get crazy as hell that now someone else is doing the same to you. lol There is nothing wrong. The code doesn't have problems. Maybe your code has problems. And that is driving you nuts. Tell me what is wrong in your view and I'll post the code. I have posted a few results right now. You have provided nothing at all since then. Nothing. Why are you that shy with your results. That's the real fishy issue.
BTW regarding your 2 bars idiocy. This is a reply I got from T.J.
Hello,
You need to understand that "barsIntrade" in AmIBroker means
"how many bars did trade span".
1-bar trade is only such trade that opened and closed AT the very same bar.
Any trades that begin on one bar and end on second bar span TWO bars
regardless which price is used.
Price used does not matter.
The program must behave consistently and you can not change the way how
bars are counted based on price. How would you count bars if somebody
wanted to include slippage like this:
BuyPrice = Close + Slippage; ?
Best regards,
Tomasz Janeczko
amibroker.com
An in regards to BarsInTrade object of custom backtest interface
in comparison to #bars column.
Hello,
The value displayed in the report is ONE-based.
All AFL variables, indices, etc are always zero based (this is 'C'-language convention).
For example when there are 200 Bars the bars are indexed starting from 0 and ending at 199.
The same occurs in many places. For example rows are numbered from 1 for display but
from 0 internally.
As documented in the manual.
http://www.amibroker.com/guide/a_custombacktest.html
BarsInTrade
long BarsInTrade
bars spent in trade (counting starts from 0)
If BarsInTrade zero - it means that "the trade is just open" (and report will report 1 in this case).
Best regards,
Tomasz Janeczko
amibroker.com
So Billy boy, just use this CBT code in addition to your code to see that barsintrade outputs 1 in this our case as it starts counting from 0.
Code:
SetOption("ExtraColumnsLocation", 13 );
SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
bo = GetBacktesterObject();
bo.Backtest(1);
// iterate through closed trades
for( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
{
bit = trade.barsintrade;
trade.AddCustomMetric("BIT", bit);
}
bo.ListTrades();
}