Trade STOXX 50 based prior behavior of SP500
Author: brizzle351
Creation Date: 4/25/2011 3:12 AM
profile picture

brizzle351

#1
I'm looking to test trades in the Europe session based on behavior in the prior American session. For example if the SP500 gains/falls greater than x points in the cash market then buy/sell within x minutes of market open on the STOXX50 and hold for x minutes.

Could someone please help me code this specifically or point me to someone who can??

Thanks.

profile picture

Eugene

#2
Start by checking out:

*DataSeries > Accessing Secondary Symbols > How to: Access DataSeries of Secondary Symbols in the WealthScript Programming Guide and
* GetExternalSymbol in the QuickRef.

Here are a few threads containing code samples or pointers to help you out with accessing secondary symbol's data:

Basketing / Indexing - Applying Strategy to collective price action versus individual symbols
how to do GetExternalSeries in WL.net
How to add a comparative index...like .spx...to a symbol chart to see if,for exaple, a sentiment symbol, offers good signals for entries and exits.

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

brizzle351

#3
Thank you. Do you mind showing me how to change to the points to %? and what does "double points = 0.1" mean?
profile picture

Eugene

#4
QUOTE:
and what does "double points = 0.1" mean?

Defining a value of type double. Check out the Wiki FAQ: How do I start with C# ?
QUOTE:
Do you mind showing me how to change to the points to %?

If my understanding is correct:
CODE:
Please log in to see this code.

i.e. replacing absolute change with percent change.
profile picture

brizzle351

#5
Thank you. How do I code the entry based on the previous days ROC of the external symbol? For instance if the external symbol closes greater than x% higher during the cash market then buy at market within x minutes of the subject market opening?

Is the buy rule **if (ROCAbove[bar]>5){BuyAtMarket(bar + 1, "");**

Q1) Does this automatically reference the external symbol?
Q2) Can I set this to cash market only? with an opening an closing time rule?
Q3) Do I change **DataSeries change = sp500.Close - (sp500.Close>>1);** to **DataSeries ROCAbove =ROC.Series(Close,1);** and if so how do I reference the the SP500?
profile picture

Eugene

#6
Please carefully re-read my reply from 4/25/2011 4:30 AM, namely the pointers to the Wealth-Lab manuals. The questions you're asking, especially Q1 and Q3, indicate that you skipped studying these basic concepts in the online guide.
profile picture

brizzle351

#7
OK thanks, have found and printed the WealthScript programming guide... Is there anyone you know of I can pay to write a script for me to spec whilst I'm learning? My strengths lie elsewhere..
profile picture

Eugene

#8
QUOTE:
Is there anyone you know of I can pay to write a script for me to spec whilst I'm learning?

Our webmaster has been implementing a MarketPlace feature to connect developers/coders/etc with customers where one could request a custom script/solution or on the other hand, offer his/her services in coding/consulting/whatnot.
profile picture

brizzle351

#9
Thanks, will keep an eye out
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).