logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Smeako1974  
#1 Posted : Thursday, July 8, 2021 12:35:01 PM(UTC)
Smeako1974

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/6/2021(UTC)
Posts: 1
Location: Coffs Harbour

Hi Guys,

Just wanting to code in an ATR trailing stop into a system test. I have buy signals at oversold positions within a trend and the price action (for long trades) is generally either below the two-way ATR indicators I’ve tried, or the ATR indicator relies on manual input for buy date which doesn’t seem possible in the system tester.

I have had a play around with some code and can only get the trades to stop out if the price action has crossed above the coded ATR line and then returned. Basically, I think I need to hard code an ATR trailing stop into the sell order tab of the system tester but can’t work out how to reference the buy signal to commence the ATR plot. Any idea how I would do this?

Thanks

Edited by user Friday, July 9, 2021 1:05:36 PM(UTC)  | Reason: Not specified

MS Support  
#2 Posted : Friday, July 9, 2021 2:28:37 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 91 times
Was thanked: 155 time(s) in 150 post(s)
Originally Posted by: Smeako1974 Go to Quoted Post

Hi Guys,

Just wanting to code in an ATR trailing stop into a system test. I have buy signals at oversold positions within a trend and the price action (for long trades) is generally either below the two-way ATR indicators I’ve tried, or the ATR indicator relies on manual input for buy date which doesn’t seem possible in the system tester.

I have had a play around with some code and can only get the trades to stop out if the price action has crossed above the coded ATR line and then returned. Basically, I think I need to hard code an ATR trailing stop into the sell order tab of the system tester but can’t work out how to reference the buy signal to commence the ATR plot. Any idea how I would do this?

Thanks

Hi,

Per our formula writer, a logical switch is the way to accomplish this. Formula primer 2 https://www.metastock.com/customer/resources/formulas/primer.aspx explains how to do custom trailing stops but is a more advanced guide. You could also try the TradeTracker.dll. The help file gives the details on how to use this (Open F1 Help within MetaStock and use the Search tab for TradeTracker). If you are unable to get a more detailed answer here or would like direct assistance you can also submit a custom formula work request at https://www.metastock.com/customer/resources/formulas/customformulaform.aspx (There is a fee for this).

Users browsing this topic
Guest (Hidden)
Similar Topics
System Tester and Stop Limit (Formula Assistance)
by temperino 4/10/2024 9:50:44 AM(UTC)
handle system tester results (Error Messages)
by temperino 3/17/2024 3:31:26 PM(UTC)
System Tester Sell Order (Formula Assistance)
by jhmathisjr 3/10/2024 6:18:17 PM(UTC)
system tester fixed profit (MetaStock)
by gorachand 12/16/2023 6:27:23 PM(UTC)
system tester code (Formula Assistance)
by gorachand 11/22/2023 2:19:04 AM(UTC)
System Tester - Relative Comparative Strength (Formula Assistance)
by DWMcGrack 9/9/2022 8:28:24 AM(UTC)
System Tester Portfolio (MetaStock)
by Dzeer1212 10/24/2020 4:21:44 AM(UTC)
Error in System Tester (Error Messages)
by anthonyaj 7/11/2020 7:25:25 AM(UTC)
System Tester, Default Dates Range (MetaStock)
by nkormanik 8/19/2017 7:42:31 AM(UTC)
Overhaul "Enhanced System tester" (Product Wish List)
by TomHam 6/26/2017 6:54:56 PM(UTC)
How do I enter a custom formula into the System Tester? (Custom Formulas)
by MS Support 5/8/2017 4:37:00 PM(UTC)
Roy Larsen's Latch Tutorial & Sprunger's Guide to the Enhanced System Tester (Basic Coding Techniques)
by RUTrading 4/14/2017 5:36:57 PM(UTC)
How to selected top 5 stocks from a group of stocks in System Tester (Advanced Coding Techniques)
by iehmfok 2/4/2017 11:31:20 AM(UTC)
hindsight System Tester (MetaStock)
by Fahad04 9/26/2016 8:17:16 AM(UTC)
Help with System Tester (Formula Assistance)
by Rafael 6/2/2016 5:05:23 AM(UTC)
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.