How to create strategy for portfolio

How to create strategies and indicators
Message
Author
Radek
Posts: 11
Joined: Tue Jul 14, 2009 11:53 am

How to create strategy for portfolio

#1 Postby Radek » Tue Jul 14, 2009 11:58 am

Hi,
How do I create strategy which can be run on portfolio of currencies?
When I created one strategy it seem that it runs only on first currency, but not on others.
Do I need extra copy of strategy (.dll) for each pair?

Radek

User avatar
Terranin
Site Admin
Posts: 833
Joined: Sat Oct 21, 2006 4:39 pm

Re: How to create strategy for portfolio

#2 Postby Terranin » Tue Jul 14, 2009 6:40 pm

Radek wrote:Hi,
How do I create strategy which can be run on portfolio of currencies?
When I created one strategy it seem that it runs only on first currency, but not on others.
Do I need extra copy of strategy (.dll) for each pair?

Radek


Strategy receives all ticks from all currencies. You can see from which currency it came with Symbol function. So you can process all currencies in 1 strategy. Something like:

if Symbol = 'EURUSD' then <do something>
if Symbol = 'USDJPY' then <do other things>
Hasta la vista
Mike

ghamm
Posts: 39
Joined: Wed Feb 11, 2009 3:02 pm

Re: How to create strategy for portfolio

#3 Postby ghamm » Wed Jul 15, 2009 11:29 am

Radek wrote:Hi,
How do I create strategy which can be run on portfolio of currencies?
When I created one strategy it seem that it runs only on first currency, but not on others.
Do I need extra copy of strategy (.dll) for each pair?

Radek


I do this all the time..
A couple of things to remember..

1. As mike said, you can use the Symbol() function, to see what pair gave you the tick.. (If you care)

2. If you want to use the default "Bid" function, it will give you the price of the pair that you set.. So , you want to deal with the pair "EURUSD", then make sure you set it as the default.
I.E. SetCurrencyAndTimeFrame('EURUSD', PERIOD_M5);
you can also use the "i" functions , just like MT4. IBid() for example, will allow a parameter to SPECIFY a pair.


I will basket trade sometimes 5 pairs at once, either in a hedge or just a simple basket. Its one of the strongest features of FT.


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 8 guests