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
__,_._,___
|