Support Board
Date/Time: Sat, 23 Nov 2024 17:47:09 +0000
Post From: Determing Day of week for each bar on the chart
[2024-08-11 03:36:01] |
Tony - Posts: 516 |
I assume your code should look something like this: for (int IndexCount=0; IndexCount<=sc.Index; IndexCount++) { testPlot[IndexCount] = sc.BaseDateTimeIn[IndexCount].GetDayOfWeek(); } SUNDAY is the value 0, and MONDAY is the value 1, etc. your original code had unnecessary steps. A bit off topic and my personal experience, I have written a few indicators/studies with ThinkScrip, NinjaScript, PineScript and ACSIL. ACSIL is THE most powerful yet the easiest tool. I was a bit surprised that you didn't understand how indexes work, because all other trading platforms follow the exact same principle. Date Time Of Last Edit: 2024-08-11 03:44:44
|