Hi:
I want to use backtestRegularRaw mode and I also want to use Applystop using StopModePoint.
Here is my code (most of it is from the knowledge base)
SetBacktestMode( backtestRegularRaw );
lbp = 30; //LookBackPeriod
RiskPerShare = 3 * EMA(ATR(lbp),20);
PositionRisk = 2; // 2% of equity
PctSize = PositionRisk * BuyPrice / RiskPerShare;
SetPositionSize( PctSize, spsPercentOfEquity);
ApplyStop( stopTypeLoss, stopModePoint, RiskPerShare, True );
However, I get an error 43: Variable stops are not supported in rotational and Raw backtest modes.
So, do I need custom backtest to achieve this?
If so, has anybody done it and can share their code?
Thanks
Vandan
__._,_.___
Posted by: vandan_tanna@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
.
__,_._,___
EmoticonEmoticon