PureBytes Links
Trading Reference Links
|
Hello,
I have a profit stop based on the basic looping technique shown "Back
testing your trading ideas". To that code I've added a switch to
disable the stop when there is at strong uptrend, like this:
ADXprofitperiod = 3;//Optimize( "APP", 3, 2, 14, 1 );
NoProfitTrigger = ( PDI( ADXprofitperiod ) > MDI( ADXprofitperiod )
AND PDI( ADXprofitperiod ) > ADX( ADXprofitperiod ) );
While NoProfitTrigger is True, the profit stop is ignored. It doesn't
create a big gain, but UPI, for instance, is improved 4 - 6%.
I would like to explore whether having ADXprofitperiod vary by the ROC
or LinRegSlope of the Close would enhance the results over using a
fixed period for all trades. Of course I get an out of range error if
I try to use:
ADXprofitperiod = ROC( Close, 7 );
ADXprofitperiod = 3;//Optimize( "APP", 3, 2, 14, 1 );
NoProfitTrigger = ( PDI( ADXprofitperiod ) > MDI( ADXprofitperiod )
AND PDI( ADXprofitperiod ) > ADX( ADXprofitperiod ) );
I tried the following,
ADXprofitperiod = ROC( Close, 7 );
...start of loop code...
for(...
{
NoProfitTrigger = ( PDI( ADXprofitperiod[i]) >
MDI( ADXprofitperiod[i] ) AND PDI( ADXprofitperiod[i] ) >
ADX( ADXprofitperiod[i] ) );
//test for profitstop and NoProfitTrigger
}
...end of loop code...
but using the MDI/PDI/ADX indicators in the loop caused execution to
grind to a halt. Well, that's my assumption, there was no error
message - I had to use Task Manager to shut down AB.
Any ideas gratefully accepted.
Thanks,
Joe
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL 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
*********************************
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|