FACTORS for an only long trading algo

Posted By: ags

FACTORS for an only long trading algo - 01/30/20 09:41

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 !
Posted By: danatrader

Re: FACTORS for an only long trading algo - 02/01/20 18:53

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.
© 2024 lite-C Forums