Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (M_D), 1,430 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Single advise model for portfolio #481481
09/19/20 22:24
09/19/20 22:24
Joined: Oct 2017
Posts: 52
Brazil
J
jmlocatelli Offline OP
Junior Member
jmlocatelli  Offline OP
Junior Member
J

Joined: Oct 2017
Posts: 52
Brazil
Hi,
I've developed a code to trade based on candle patterns using advise functions with PATTERN method. It runs fine on a list of assets, creating a specific set of rules for every symbol in the list.
But, as I'm looking for candle patterns across all symbols, I would like to create a common set of rules for all assets.
Is it possible? And how?
Thanks in advance,

Regards,
JM

Re: Single advise model for portfolio [Re: jmlocatelli] #481495
09/21/20 19:41
09/21/20 19:41
Joined: Oct 2017
Posts: 52
Brazil
J
jmlocatelli Offline OP
Junior Member
jmlocatelli  Offline OP
Junior Member
J

Joined: Oct 2017
Posts: 52
Brazil
This is part of the code:


string Name;
while(Name = loop(Assets))
{
asset(Name);
var SignalLong = adviseLong(PATTERN+FUZZY+RETURNS +3,0,
priceHigh(2),priceLow(2),priceClose(2),priceOpen(1),
priceHigh(1),priceLow(1),priceClose(1),priceOpen(0),
priceHigh(0),priceLow(0),priceClose(0),priceOpen(-1)
);
var SignalShort = adviseShort(PATTERN+FUZZY+RETURNS +3,0,
priceHigh(2),priceLow(2),priceClose(2),priceOpen(1),
priceHigh(1),priceLow(1),priceClose(1),priceOpen(0),
priceHigh(0),priceLow(0),priceClose(0),priceOpen(-1)
);
if(SignalLong>SignalThreshold)
enterLong();
if(SignalShort>SignalThreshold)
enterShort();
}

It creates one set of rules for each symbol in the assetList. And this is ok.

My question is how to create a single/common set of rules for all assets in the assetList.

Last edited by jmlocatelli; 09/21/20 19:42.

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1