#twitter-follow { border: 0;position: fixed; top: 240px; left:0;} #live-support { border: 0;position: fixed; top: 370px; left:0;} #knowledge-base { border: 0;position: fixed; top: 170px; left:0;}

 help with logic 0

 Amritendu Maji 2017-07-31 12:05:36 Hi, Thank you for your continual support and help. It is very much appreciated. I am trying to write this code in QS but can't figure it out. Please provide a code snippet to help. We are using daily data. a = Lastweek's high b = This week's low c = EMA(close, 50); // ---- Daily EMA at the end of this week d = EMA(close+5, 50); // ---- Daily EMA at the end of last week e = iff(a < d && b > c, 1, 0); What is the formula/code to assign to a and b. Thank you.
 Amritendu Maji 2017-08-01 01:06:49   0 Now let us assume we are using weekly data. a = High[1]; b = Low; c = EMA(close, 50); // ---- Daily EMA at the end of this week d = EMA(close+5, 50); // ---- Daily EMA at the end of last week e = iff(a < d && b > c, 1, 0); How do we make c and d use daily data? Thank you.
 QuantShare 2017-08-01 08:15:09   0 Functions such as "timeframeapply" allows you to access other time frame data. However, you will be able to access weekly bar data for example only when it is completed and thus "this week low" cannot be accessed. You need to write something like this: a = timeframedecompress(timeframeapply(7, high)); a = ref(a, 1); nw = week() != ref(week(), 1); b = lowestsince(nw, low); Accessing daily data in weekly time frame is not possible unless a custom c# code is written in "Tools -> Create Functions".
 Amritendu Maji 2017-08-01 11:12:31   0 Thank you for the reply. Can you recommend an example to see how to access daily data in weekly time frame? I am trying to learn QS, so your help is very much appreciated. Thank you, Maji
 QuantShare 2017-08-02 09:59:00   0 In "Tools -> Create Functions", you need to use the "cFunctions.GetTimeframeData" function to access data for a specific time frame.
 Amritendu Maji 2017-08-02 13:40:20   0 Thank you for the reply. Where can I get a list and description of these items like cFunctions.GetTimeframeData, TA.Value(closes,firstbar) etc.? Just like the QS language guide, that I am still reading and learning, a guide for these functions will help people like us. Thank you.
 QuantShare 2017-08-03 05:47:45   0 Best Answer In the script editor, use CONTROL+SPACE to display the list of available functions at any moment. Click on the "Help" red button at the bottom of the script editor.
No more messages