Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 13:39:07 +0000



Post From: Sim mode attached orders.

[2016-07-08 05:12:18]
enemyspy - Posts: 304
Hi I just wanted to quickly confirm something. I am using the following code block in order speed up replays. So basically it constantly truncates the size of the chart via start date in order to keep the memory lower ect. I did not notice this until recently - but what is happening is that if a trade is on during the reload and recalculate that the code below triggers: the attached target and stop are getting removed when the chart loads up again.
Is this to be expected? as in should the target and stop persist through this circumstance?


if(sc.Index == sc.ArraySize-1)
{
if (sc.IsReplayRunning() && (ReplayDays.GetInt()>0 && !sc.IsFullRecalculation))
{
SCDateTime Current = sc.BaseDateTimeIn[sc.ArraySize - 1];
if (DATE_PART(Current) - DATE_PART(sc.BaseDateTimeIn[0]) > ReplayDays.GetInt() && Current.GetDayOfWeek()<3)
{
        
SCString mssg;        
sc.ChartDataStartDate = DATE_PART(Current) - (Current.GetDayOfWeek() + 2);        
sc.AddMessageToLog(mssg.Format("Replay Optimizer Reloading : %d",sc.ChartDataStartDate),1);        
      
}
}

Date Time Of Last Edit: 2016-07-08 05:15:12