Reply

EasyLanguage bug

2 replies

eastpeace

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

Visit profile

9 years ago #113331

Hi, Mark,

 

here is a strategy generated by SQ.

 

the pseudo code is very clear:

 

LongEntryCondition = WR(70)>MACD signal;

ShortEntryCondition = WR(70)<MACD signal

 

(even I think the calculation between WR and MACD would make no sense  🙂 )

 

but in TS(easylanguage) code is :

 

LongCond = SQpercentR(70) [0] > Xaverage(MACD(close,25,13,7),MACDLength) [0];);

 

error1: maybe the last bracket ” ) ” is needless;  and even the backtracks value ,”[0]”  is superfluous.

 

error2: Is MACDLength a parameter?  but with no declaration and assignment.

 

I am not sure the compilling result the Tradestation, I use multicharts.

 

and the macd function in MC have two paras. what does MACD(close,25,13,7) mean? the dif of two move average or the dif’s EMA? It would be better if you could provide SQMACD function.

 

 

I sincerely expect that the next version SQ would be more friendly to MC’s language. I know this means a lot of work. But I really need your help and expect SQ4 would come soon.

 

Thanks.

 

 

0

eastpeace

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

Visit profile

9 years ago #128803

I changed the condition as below in Multicharts

 

LongEnCond = SQPercentR(70) > MACD(close,25,13);

ShortEnCond = SQPercentR(70) < MACD(close,25,13);

 

It works and the equity curve looks good.

 

Although I don’t know Dif’s sense between MACD and R%.

 

 

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

9 years ago #128806

thanks for reporting it, it seems we have a small bug in generating EasyLanguage code for MACD, we will release an autoupdate fix later today

Mark
StrategyQuant architect

0

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