Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (Nymphodora, AndrewAMD, Quad, TipmyPip), 889 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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