Reply

Signal appears after a specific date

4 replies

TJ#

Customer, bbp_participant, community, 144 replies.

Visit profile

9 years ago #112500

EA Signal indicator function

 

How to let EA Signal to appear only after a specific date? like 18th Aug 2014

 

Thanks.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

9 years ago #125952

you can use date functions to check for an date, or to check if current date is greater than your constant.

Mark
StrategyQuant architect

0

TJ#

Customer, bbp_participant, community, 144 replies.

Visit profile

9 years ago #125979

The Date func has only “=” and “” operators and does not has greater or lesser than operator. May be I have misunderstood your reply. 

 

 

I tried both “=” and “” and not the results I am looking for. 

 

 

I have attached my sqw file, are you able to show me how to do this right? Thanks very much. 

 

IF

 

EMA 10(D1) > EMA 20(D1)

Date > 14 Aug 2014

 

THEN

PlaySound(“alert.wav”);

 

 

I would like the signal to appear after 14 Aug 2014 so that the chart is not clustered with signals.

 

 

 

 

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

9 years ago #126019

The problem is that Date function returns date as a text only, so it cannot be compared to be bigger or smaller.

 

But there is a simple way how to compare a date, use:

 

Time > Custom Function: StrToTime(“2014.08.14”)

 

date format for StrToTime is is yyyy.mm.dd.

 

I’m attaching your strategy with this change.

Mark
StrategyQuant architect

0

TJ#

Customer, bbp_participant, community, 144 replies.

Visit profile

9 years ago #126036

Thank you very much.. 🙂

0

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