Support Board
Date/Time: Thu, 23 Jan 2025 00:08:34 +0000
Post From: Anything similar to a dynamic rotation study ??
[2015-10-17 03:44:59] |
QnReally - Posts: 181 |
This requires a little bit of experimentation. Here is what I would do: 1) Add the Zig Zag study to a chart and set Additional Output for Spreadsheets = Yes. This will give present additional subgraphs in the study. One of them would be Zig Zag Line Length. 2) Write a study to access the Zig Zag Line Length subgraph. Remember, all zero values in this subgraph can be ignored. Then figure out a way to write the SCID file from all the non-zero Zig Zag legnths. Here are some pointers: a) Open an SCID file for writing. For example, to open an SCID file for reading I used: datafile = fopen(Filename.c_str(), "rb");. For writing, the syntax will be a small variation. b) Write the s_IntradayHeader record into the file. This is only done once. I have not written SCID files before so you may have to do some research on this. c) Fill in the s_IntradayRecord structure (check http://www.sierrachart.com/index.php?page=doc/doc_IntradayDataFileFormat.html for the format) and write the s_IntradayRecord to the SCID file (you would be doing these steps once for each non-zero length rotation). The field values can be set as follows and see what works: DateTime = sc.BaseDateTimeIn[barindex] Open = RotationSize -- set High, Low, Close to the same value NumTrades=1 TotalVolume=1 BidVolume=1 -- It doesn't matter if you set BidVolume or AskVolume AskVolume=0 d) Close the SCID file * See http://www.sierrachart.com/index.php?page=doc/doc_IntradayDataFileFormat.html#FeedSierraChartData for help on creating SCID files. 3) Create a new chart and open the SCID file you created above. Then try the VolumeByPrice study on it to see if it works. Hope that helps. |