Login Page - Create Account

Support Board


Date/Time: Wed, 01 May 2024 14:49:43 +0000



Post From: 64 Bit performance

[2018-04-04 22:03:13]
WarriorTrader - Posts: 245
Hello,

I have reverted back to how the old function and everything is working fine. It is time for me to move on. Please keep sc.GetStudyPersistentVariablesFromChartUsingID available even if it is not documented.


  const s_PersistentVariables * p_DeltaLadderPersistVars = sc.GetStudyPersistentVariablesFromChartUsingID(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID()); //ChartStudyInput.GetStudyID() Delta Ladder

  if (p_DeltaLadderPersistVars) {

    TickHigh = p_DeltaLadderPersistVars->f1; //const float& TickHigh = sc.GetStudyPersistentFloatFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 1); //TickHigh = p_DeltaLadderPersistVars->f1;
    TickLow = p_DeltaLadderPersistVars->f2; //const float& TickLow = sc.GetStudyPersistentFloatFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 2); //TickLow = p_DeltaLadderPersistVars->f2;
    TickValueCurrent = p_DeltaLadderPersistVars->f3; //const float& TickValueCurrent = sc.GetStudyPersistentFloatFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 3); //TickValueCurrent = p_DeltaLadderPersistVars->f3;
                                   //float& RemotePriceCurrent = GetStudyPersistentFloatFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 4); //RemotePriceCurrent=p_DeltaLadderPersistVars->f4;
    TickIndex = p_DeltaLadderPersistVars->i1; //const int& TickIndex = sc.GetStudyPersistentIntFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 1); //TickIndex = p_DeltaLadderPersistVars->i1; //will be replaced with sc.Index //for SimTickPriceMarker  

    ValueHighPrice = p_DeltaLadderPersistVars->f4; //const float& ValueHighPrice = sc.GetStudyPersistentFloatFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 4);
    ValueLowPrice = p_DeltaLadderPersistVars->f5; //const float& ValueLowPrice = sc.GetStudyPersistentFloatFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 5);
    ValuePOC = p_DeltaLadderPersistVars->f8; //const float & ValuePOC = sc.GetStudyPersistentFloatFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 6);

    CurrentOpen = p_DeltaLadderPersistVars->f7; //const float& CurrentOpen = sc.GetStudyPersistentFloatFromChart(VisibleBarsChart.GetChartNumber(), VisibleBarsChart.GetStudyID(), 7);

  }
  
  
const float PersistentValue = sc.GetStudyPersistentFloatFromChartStudy(ChartStudyReference.GetChartNumber(), ChartStudyReference.GetStudyID(), 1);


The code you just posted could NOT possibly compile. The function in question has a return type of a reference to a float – float & - not a return type of float. I included a screen shot of my Visual Studio
showing the return type of the function.

Anyway, looks like I am the only one using this advanced feature since it has been years since this function was developed but no one complained.
The thing is if someone else who is new to SC tries the function, instead of posting a message on support, they will just move on to something else.

SC is on the cutting edge of trading software, making things like bid/ask data availably 10 years before other popular trading software (Ninja).
The new version is very fast and responsive. Keep up the good work.

Thx,
WT
imagePersisVarType.png / V - Attached On 2018-04-04 21:55:13 UTC - Size: 153.3 KB - 304 views