OmniTrader Forum - Portfolio Simulation Mode
Basic moving average strategy for backtesting

^ Top
trading4rent

Posts: 28

Joined: 9/26/2006
Location: Illinois

User Profile
 
Subject : Basic moving average strategy for backtesting
Posted : 4/14/2016 10:35 AM
Post #36146

I am trying to create my own strategy's but I am not having any luck. Below is what I have on my screen. For simplicity sake I just want to create a strategy where I go long when the 50day moving average crosses above the 200 day moving average. And close out the position when the 50 day goes below the 200 day moving average. After this I should be able to tweak it around. If someone would be kind enough to help me create this strategy it would be greatly appreciated. I thought trading was frustrating but trying to learn this back testing is a different beast. lol... I am just not sure what to put in parameters, conditions, filter sections.


^ Top
Jim Dean

Posts: 2903

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Basic moving average strategy for backtesting
Posted : 4/14/2016 10:43 AM
Post #36147 - In reply to #36146

This kind of thing has been discussed a lot of times on the N forums ... it takes a while to explain. But, it's sort of hard to find prior posts about this due to the hodgepodge nature of the forum. The TradeTight forum was created largely to provide a highly-organized structure so that things could be found later, and with special focus on custom development of strategies with OR without OT Pro. Click here for a link to a good starting point that shows you how you can set things up to create your own entry rules without being bound to the list of Systems in OT. There are many other postings in that Room and Section of TT that you might find helpful in your "adventure". And, you might even decide to upgrade to OT Pro, along the way.

Have fun!
^ Top
EYEGUY

Posts: 1421

Joined: 12/12/2003
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Basic moving average strategy for backtesting
Posted : 4/14/2016 10:59 AM
Post #36148 - In reply to #36146

trading4Rent:

Not knowing if you have OT Pro or not here is a rough approximation of what you want that can be done with the standard OT. It uses an EMA for the Entry Signal and god knows what for the Exit.

But, give it a shot and examine it - there might be some tweaking you can do to get what you want.

Tom Helget
Attached file : EMA Moving Average Crossover.ots (1100KB - 124 downloads)

^ Top
trading4rent

Posts: 28

Joined: 9/26/2006
Location: Illinois

User Profile
 
Subject : RE: Basic moving average strategy for backtesting
Posted : 4/14/2016 1:53 PM
Post #36149 - In reply to #36146

I just wanted to take a quick second and say "thank you" to everyone who tried to help me with this by responding to my post. Its nice when you get a reply back so quick.
^ Top
trading4rent

Posts: 28

Joined: 9/26/2006
Location: Illinois

User Profile
 
Subject : RE: Basic moving average strategy for backtesting
Posted : 4/14/2016 1:55 PM
Post #36150 - In reply to #36146

One more thing. I am using Omnitrader 2014. Without looking foolish, where would I open that file up at. If you open outside of omnitrader it will not open.
^ Top
Jim Dean

Posts: 2903

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Basic moving average strategy for backtesting
Posted : 4/14/2016 2:06 PM
Post #36151 - In reply to #36150

With OT shut down, copy the OTS (strategy) file into the OT2014/Strategies folder, then restart OT and select that strategy using the chesspiece, so you can examine it.

And yes, responses to reasonable questions usually do come back fairly quickly on these forums.
^ Top
EYEGUY

Posts: 1421

Joined: 12/12/2003
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Basic moving average strategy for backtesting
Posted : 4/14/2016 2:11 PM
Post #36152 - In reply to #36150

trading4rent:

You can't open that .ots file!

Copy it to the Nirvana/OT2014/Strategies Folder on your computer.

From there invoke OT and go to Edit....Trading Strategy and you will get:




You can then Highlight and Edit it.

I hope that helps!

And, please remember that without a custom coded System and Stop that this may not be exactly what you envisioned.

Tom Helget

Attached file : Edit Trading Strategy.PNG (21KB - 401 downloads)



https://www.omnitrader.com/currentclients/otforum/thread-view.asp?threadid=10211&posts=7