[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Different scale out date



PureBytes Links

Trading Reference Links

Hello,

the code below a part of my CBI. Unfurtunately the scale out date shown in the detailed log is different than the one defined in the code and shown through Debug View. The difference is always 1 bar. Right now it looks like that it is using future quotes, because the detailed log shows on 1 bar earlier the Scale Out with the open price from next bar.
When i use the BarReplay tool, than it doesn't show the Scale Out on the detailed log at the same bar, only 1 bar later it displays it in the detailed log.
 
Can someone help ?
 

price = trade.GetPrice( bar, "O" );

if(bar > 1 AND DiffToMaxRisk[bar] > 0 )
{
bo.ScaleTrade( bar, trade.Symbol, False, price, ScaleAmountCashWithMargin[bar], trade.MarginDeposit );
_TRACE("bar " + bar + ", " + DateTimeToStr(dt[bar]) + ", Symbol = " + trade.Symbol);
_TRACE("bar " + bar + ", " + DateTimeToStr(dt[bar]) + ", Scale Out, Amount = " + ScaleAmountCash[bar] + " € " );
_TRACE("bar " + bar + ", " + DateTimeToStr(dt[bar]) + ", ScaleAmountInContracts = " + ScaleAmountInContracts[bar]);
}

--
Regards
 
__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___