Not logged in

Forums

Viewing 3 posts - 1 through 3 (of 3 total)
  • #113331 |
    Customer
    269 Posts

    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.

     

     

    Attachments in this forum are visible only for registered users.
    Attachments in this forum are visible only for registered users.
    #128803
    Customer
    269 Posts

    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%.

     

     

    Attachments in this forum are visible only for registered users.
    Attachments in this forum are visible only for registered users.
    #128806
    Administrator
    3103 Posts

    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

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.