READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

BollingerBand functions from SQ

6 replies

Joseph

Subscriber, bbp_participant, community, 2 replies.

Visit profile

10 years ago #115551

Hi everyone,

 

I am Joseph, and I come from Taiwan. This is my first time post here.

I encounter a question about generated strategies from SQ, and the source code type is Tradestation (EasyLanguage) code, please help answer me if you know this issue.

 

The source code:

********** Part of source code *********

(SQ_BollingerBandDown(68, 10, 0)[0] > SQ_BollingerBandDown(71, 5, 0)[0]);

(SQ_BollingerBandUp(68, 10, 0)[0] < SQ_BollingerBandUp(71, 5, 0)[0]);

 

SQ_MoneyManagement(CapitalSize, SLSize, MoneyManagementType, TradeSize, SizeRounding, RiskPerTrade, MaxTradeSize);

******************************************

 

These three functions, SQ_BollingerBandDown, SQ_BollingerBandUp, SQ_MoneyManagement are not defined in the entire source code generated from SQ.

Does anybody know what their function definitions are, respectively?

 

Deeply appreciate your feedback. Thanks a lot!

 

Sincerely,

Joseph

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #139370

Hello,
 
In order to make SQ strategies work with Tradestation, you have to import some custom EasyLanguage functions into your Tradestation.
 
Open your Tradestation, go to File -> Import/Export EasyLanguage and choose Import EasyLangauge File (ELD, ELS or ELA) then find the file:
{StrategyQuant}/custom_indicators/SQ_Tradestation.eld and import it.
 
This will import all the additional functions StrategyQuant uses, so your new strategies will run in Tradestation.

0

Joseph

Subscriber, bbp_participant, community, 2 replies.

Visit profile

10 years ago #139377

Hi Tomas,

 

Thanks for your reply. My questions are listed below.

1) Is the file {StrategyQuant}/custom_indicators/SQ_Tradestation.eld build in any Tradestation tool?

 

2)Although the generated strategies’ source code type is Tradestation (TS, Easy Language), but actually I want to use the generated ones in MultiChart (MC, Power Language).

 

Because programming type between Easy Language and Power Language is very close, originally I want to modify the generated TS strategies as Power Language format.

 

However, if MC has no build-in file like TS, how do I know what the three functions’ source code definition (SQ_BollingerBandDown, SQ_BollingerBandUp, SQ_MoneyManagement) are?

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #139408

Hello,

 

I do not have MC currently installed but the process should be identical to one in TradeStation. This is how to import custom code in MC http://www.multicharts.com/trading-software/index.php/Importing_and_Exporting_Studies

0

ctraverso

Customer, bbp_participant, community, sq-ultimate, 35 replies.

Visit profile

9 years ago #140139

I had the same error. Doing the import, it works fine! Thanks.

0

ctraverso

Customer, bbp_participant, community, sq-ultimate, 35 replies.

Visit profile

9 years ago #140140

The only error I get is that in the Tradestation SQ folder I can’t find SQ_TrueRange. At the moment it is not supported in my platform. Could you please supply it? thanks

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

9 years ago #140146

Hello,

 

here is the SQTrueRange function for Tradestation:

 

inputs: 
Period( numericsimple );


vars: periodBefore(0), first(0), second(0); 


periodBefore = Period - 1;


if(High[periodBefore] > Close[Period]) then begin 
first = High[periodBefore];
end Else begin 
first = Close[Period];
end;


if(Low[periodBefore] < Close[Period]) then begin
second = Low[periodBefore];
end Else begin
second = Close[Period];
end;


SQTrueRange = first - second;

0

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