Reply

Identical values for “Long” and “Short”

5 replies

vostrushka

Customer, bbp_participant, community, 48 replies.

Visit profile

8 years ago #114219

Is it possible to tweak strategy in a way that it would have one set of variables for both short and long orders before going to optimization?

 

Here is the example of what I mean.

This is what MQ4 code has:

 

extern double LongStopLossCoef = 6.91;

extern int LongStopLossATR = 41;
extern double ShortStopLossCoef = 6.91;
extern int ShortStopLossATR = 41;

 

… and this is what I need:

extern double StopLossCoef = 6.91;

extern int StopLossATR = 41;
 
but I need it in the strategy before optimization step so I can reduce number of optimization iterations.
I have option “Use the same parameters for long and short …” checked.
 
I think I have seen such discussions here but do not remember what was the outcome.

 

Leonid

0

vostrushka

Customer, bbp_participant, community, 48 replies.

Visit profile

8 years ago #132748

Let me add more details.

Some strategies use only one set some both for long and short.

How to make it consistent?

 

Leonid

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #132872

I have option “Use the same parameters for long and short …” checked.
 

 

Did this have any effect on strategy parameters? Long / Short should be reduced to universal for both sides

0

vostrushka

Customer, bbp_participant, community, 48 replies.

Visit profile

8 years ago #132874

Nope. Still see two variables for short and long.

Here is the example. I attached the archive with the strategy and mq4 file. The MQ4 saved from the results tab (Source code).

 

Leonid

0

vtec

Subscriber, bbp_participant, community, 3 replies.

Visit profile

8 years ago #133939

Same here! Following (arbitrary) strategy given:

====================================================================
== Strategy Parameters
====================================================================
pBB_DOWN_1 = 25;
pBB_DOWN_2 = 9.0;
pBB_DOWN_3 = 0;
pATR_4 = 34;
pBB_UP_1 = 25;
pBB_UP_2 = 9;
pBB_UP_3 = 0;
StopLossPips = 152;
LongStopTrailingCoef = 0.9;
ShortStopTrailingCoef = -0.9;


====================================================================
== Entry conditions
==================================================================== 
LongEntryCondition = Close Below Bollinger Bands(20, 2, 0)
ShortEntryCondition = Close Above Bollinger Bands(20, 2, 0)

I thought the problem here is the 9.0 (float) vs. 9 (int) value in the 2nd BB parameter. So I tried to fix it manually in the .str file:

9.0

to

9

No help, again 9.0 and 9 in Source Code tab after loading this altered .str-File into the Optimizer.

 

ShortStopTrailingCoef could be made symmetrically by taking -(ShortStopTrailingCoef), maybe this could be verified in future StrategyQuant versions. A possibility for tweaking this strategy would be nice so I can adapt/fix parameters manually but thats maybe not possible due to all the metadata which should match the strategy in the .str file.

 

Also the entry condition parameter values are not exposed as parameters and therefore not available for optimization but this is maybe by design.

0

geektrader

Customer, bbp_participant, community, 522 replies.

Visit profile

8 years ago #134403

If you use the search function of the Forum, you´ll see that I have complained about this months ago already and Mark said that there is no way to do a symmetric optimization in SQ 3.8.1 right now. But SQ4 will have an option to link variables that are optimized “together” only. So you´ll have to wait for SQ4.

 

He also just answered it here too: https://strategyquant.com/forum/topic/3846-old-strategies-will-transition-into-sq4/


🚀 Unlock Your Edge in Automated Forex Strategy Development 🚀

Historical Forex Data Starting From 1987, 28 Pairs, M1, 99% Error-Free, Lifetime Free Updates

0

Viewing 5 replies - 1 through 5 (of 5 total)