Discussions
»
Product and Service Development
»
Formula Assistance
»
Trailing Stop loss system with optimisation poarametres
Rank: Newbie
Groups: Registered, Registered Users, Unverified Users Joined: 3/12/2012(UTC) Posts: 5
|
I require the system tester with optimisation for this below stop loss indicator.
Trailing stop loss formula=
perc:=Input("Trailing Loss % :",0,100,14);
loss:=C*perc/100;
trail:=
If(C>PREV AND Ref(C,-1)>PREV,
Max(PREV,C-loss),
If(C<PREV AND Ref(C,-1)<PREV,
Min(PREV,C+loss),
If(C>PREV,C-loss,C+loss)));
Trail
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi mt4eas
Is this system long only, long and short, or short only? Can you define the entry and exit points (relative to the trailing stop)?
Roy
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
The PREV heavy code can be replaced by...
perc:=Input("Trailing Loss % :",0,100,14);
ExtFml("MSTT.TS2",C,C/100,perc);
However, I'd caution anyone using high percentage values with the MSTT DLL TS2 function that it can return N/A until the point at which the PREV-based result would cross the price being trailed. This is not a serious issue with say a 10% trail, but higher percentages would generally need more data to be loaded for the DLL-based version to generate a valid result across the target date range. Since execution of the DLL-based version is probably around 50 times faster than the PREV version, then loading 2000 data bars (in system test for example) should still run about 25 times faster than 1000 data bars loaded for the PREV code, as tested with an exploration across the S&P 500.
Roy
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Trailing Stop loss system with optimisation poarametres
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.