Login Page - Create Account

Support Board


Date/Time: Sat, 01 Mar 2025 13:51:10 +0000



Post From: A pair of ACSIL studies you might find useful.

[2017-09-13 08:44:47]
Sporken - Posts: 82
Maybe a link to this thread in the C++ would suffice for instructions and anyone googling will find this page because I've mentioned this text "__JASON Live Study Save To File" "__JASON Live Study Load from File"

A pair of ACSIL studies you might find useful.

Basic instruction are:
You just add a "__JASON Live Study Save To File" to the chart with the thing you want to save.
You specify which study you want to save.
You specify a "Unique Name". Something like "200DayMA" or "DailyMovingAverages" or "YearlyPivots" or whatever you want to name it. Don't use characters that are not allowed in filenames. (like * . " / \ [ ] : ; | = ,)
You specify how many bars should be saved into the file. The more you specify, the slower it will be. For daily data, 100 or 200 bars is normally plenty for displaying on hourly or minute charts.
You specify the save interval, how many seconds must elapse between saves. Full recalculations cause a save as well. 5 seconds or more is fine if you're not sure.
You specify whether you want it to save only the 1 specific subgraph from the study specified in Input 1, or all of the subgraphs from the study specified in Input1.
Study1 allows you to set the SG to something. The 2nd parameter on that input. If you mark "Save All subgraphs" then the 2nd parameter on Input1 is ignored (all the subgraphs are saved)

You also add a "__JASON Live Study Load from File" on the chart where you want the study to appear.
You specify the same "Unique Name" as you saved it with (Something like "200DayMA" or "DailyMovingAverages" or "YearlyPivots")
You specify how regular the updates should be, in seconds. If its a 20 second chart and you're copying Yearly Pivots then there is no point in refreshing them any more frequently than 20 seconds. Set 5 seconds if you're not sure.
The 3rd parameter "Render only visible" is something I never honestly use, it tells it to only draw into the currently visible window of chart bars, but really there's no point in doing this. the study is fast enough that I've never found a time when it was good to set this to "Yes". Just always leave this as "No" I think.
You specify how the subgraphs should appear on the subgraphs page. Once the study has run once, then the subgraphs will all be listed, ready to have their drawing style specified.

Make sure you add the Save To File Study AFTER any study that it is saving. So if you are saving your HourlyMovingAverages then this study should go after that one in the list of Studies. Come to think of it, the "Save To File" study should probably have   

sc.CalculationPrecedence = VERY_LOW_PREC_LEVEL;

in the sc.SetDefaults block.

OK hopefully that is enough for people to figure it out.
Date Time Of Last Edit: 2017-09-13 08:51:23