Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (PeWi, AndrewAMD, Quad, VoroneTZ), 463 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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