Enter if another symbol is up for the day
Author: Kenley
Creation Date: 9/29/2019 6:15 AM
profile picture

Kenley

#1
I just downloaded Wealth Lab trial and I'm looking to get going with a simple C# strategy that I can optimize. I learn best with a working starting point.

If there is a developer here who can help with this I'd be grateful.

Strategy building block is as follows:

Opens a trade for a symbol (e.g. AAPL) at a specific time US Eastern (e.g. 10 minutes before US stock market close).

Conditions to Open a trade
======================
Go Long using variable % available equity if another symbol (MSFT) is up for the day.
Go Short using variable % available equity if another symbol (MSFT) is down for the day.

Conditions to Close a trade
======================
Want the option to close trade using a trailing stop based on variable % of ATR daily range, OR at specific time of day (e.g. next day at specific time such as 15 minutes after market open).

Just looking for commented, clean code that is simple to read and follow that I can plug in to Wealth Lab and build upon as a working strategy.



profile picture

Eugene

#2
Welcome aboard again. I see you signed up at first in 2004 (another account). Cool.

One request: please name your topics more descriptively. "Help with simple strategy please" doesn't say anything while "Enter if another symbol is up for the day" (as I renamed it) summarizes your trading idea in one sentence, allowing any user to search and find such topic. If you give our search-as-you-type feature in the search box a try you'll be pleasantly surprised at the variety of solutions and ideas. ;)

Here's an example code to be run on 15-min data. Put AAPL and MSFT into a new 15-minute DataSet, update it, adjust constants (external symbol, times etc.) in the code accordingly:

CODE:
Please log in to see this code.
profile picture

vk

#3
Hi Kelley, I wonder if that did help you or if you have further questions?
I see that you also have short trades in it. Going short IMO is rather difficult. I did not run your "strategy" but do you know that at WL you can look at the long and short equity curve? Maybe the long trades are good?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).