Support Board
Date/Time: Sat, 10 May 2025 18:50:31 +0000
Post From: Saving Tick by Tick Data from a 256,000 Tick Chart
[2016-08-15 02:31:34] |
User203925 - Posts: 40 |
I am attempting to parse tick by tick data to a file from a 256,000 tick chart which includes the sc.BaseData[SC_LAST] and my indicator PPO[sc.Index]. I have tried the following code on a 256,000 chart. ofstream outFile; outFile.open("ProjectData.txt"); for (int i = 0; i <= sc.BaseDataIn[SC_LAST].GetArraySize(); i++) { float Value; Value = sc.BaseDataIn[SC_LAST][sc.Index - i]; outFile << Value << "," << PPO[sc.Index] << endl; } } outFile.close(); return; The file does "read" the tick by tick data for my indicator and the price but it only saves sc.BaseData[SC_LAST][sc.Index-1] and PPO[sc.Index-1]. I then tried to use a 1 tick chart and pull the indicator from the 256000 chart but that did not work either. Code Below SCFloatArray Chart256000; sc.GetStudyArrayFromChartUsingID(4, 1, 8, Chart256000); PPO2[sc.Index] = Chart256000[sc.Index]; Chart256000[sc.Index] = PPO2[sc.Index]; ofstream outFile; outFile.open("ProjectDataV5.txt"); for (int i = 0; i <= sc.BaseDataIn[SC_LAST].GetArraySize(); i++) { Value = sc.BaseDataIn[SC_LAST][sc.Index - i]; outFile << Value << "," << PPO2[sc.Index] << endl; } outFile.close(); //return; Is there a way to save tick by tick data (data = indicator and price fluctuation from a 256,000 tick chart or any chart greater than 1 tick ? |