Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (MadJack, AndrewAMD, Quad), 540 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
FACTORS for an only long trading algo #478980
01/30/20 09:41
01/30/20 09:41
Joined: Oct 2018
Posts: 90
Germanien
ags Offline OP
Junior Member
ags  Offline OP
Junior Member

Joined: Oct 2018
Posts: 90
Germanien
Hi,

i'l working on an only long algo and have some trouble with the identifier and subsequent FACTORS.

from the manual:
If different algorithms, parameters, or rules for long and short trades are used, the identifiers should end with ":L" or ":S" for being consistent with the trade names used in the message window and parameter files. Long trades are then automatically suppressed on ":S" algos and short trades on ":L" algos, but reverse positions are still closed depending on Hedge.


But if i name any algo with end :L and have not the same with :S i get FACTORS in the fac file like these:

US30:TLA1:L .361 2.72 80/290 102.5

but since there is no TLA1:S, i get no TLA1 FACTOR so that the script never enters a trade assuming TLA1 FACTOR = 0.


I should get FACTORS like these for trading:

US30:TLA1 .361 2.72 80/290 102.5
US30:TLA1:L .361 2.72 80/290 102.5
US30:TLA1:S .000 ---- 0/0 0.0

and i only get these if i also activate a :S algo, which takes a lot of time in a multiple algo/asset script.

-------------------------

In another intent, i just name the algo as usual, without :L, but since the script only enters long positions, the FACTORS in the fac file again look like these:

US30:TLA1:L .361 2.72 80/290 102.5

again, not entering trades since there is no TLA1 FACTOR...

-------------------------

In the script i use e.g.:

function TLA1()
{...}

...

function run()
{
...
while(algo(loop("TLA1:L", ... )))

...
if(Algo == "TLA1:L")
TLA1();

Is something wrong in my script?
Any idea how to overcome this issue?
(other than manually changing the fac file adding e.g. US30:TLA1 .361 2.72 80/290 102.5 (same as TLA1:L))

Thank you very much for your support !

Re: FACTORS for an only long trading algo [Re: ags] #478988
02/01/20 18:53
02/01/20 18:53
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
Better post all relevant code, but if it works with two algos, why not just leave the short algo empty, then it wont be called.


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