Login Page - Create Account

Support Board


Date/Time: Fri, 24 Jan 2025 11:26:37 +0000



Post From: ACSIL - UDP request for resetting Persistent Variables re sc.SetDefaults

[2019-01-09 15:06:38]
PeterSt - Posts: 36
I'm afraid we talk passed each other;
There is no IsFullRecalculation in order and there is no Index==0 in order when the DLL reloads. There is no change anywhere. When the DLL is reloaded this is not at all the same as when the study is unloaded (removed) and reloaded (added).

Please grasp that the DLL is reloaded by external means (see OP, UDP request), that the Study remains active (which is what we want) and that no trigger exists that I know of. Also not by implication like Index being 0 (the bars are not recalculated or anything).

The suggestion to call ClearAllPersistenceData does not work either because there it no trigger to call THAT.

Btw, because of your persistence on this, I tried your suggestion in order to not look foolish - just in case. But of course it does not do a thing.

And merely :

You just need to use this code near the top of the study function but below the sc.SetDefaults code block:

I don't think so because this is all about re-applying the sc.SetDefaults code itself. Not the code under that.

  bool Recompile = 0;   // Set to 1 when the SetDefaults are to be executed. Back to 0 for data processing.

  if (Recompile || sc.SetDefaults)     // 06-01-2019,PS, Recompile.

  {
    // Set the study configuration and defaults.

    sc.GraphName = "XX04Trading Example: Using Moving Average and Target and Stop";

    BuyEntrySubgraph.Name = "XX04Buy Entry";
    BuyEntrySubgraph.DrawStyle = DRAWSTYLE_ARROW_UP;
    BuyEntrySubgraph.PrimaryColor = RGB(64, 255, 0); // SUPPOSE I WANT TO CHANGE THE COLOR OF THIS !
    BuyEntrySubgraph.LineWidth = 3;
    BuyEntrySubgraph.DrawZeros = false;

    return;
  }

... Now cause the DLL to be loaded by means of UDP request with the notice I just changed my arrow color and like to see it changed ...
Date Time Of Last Edit: 2019-01-10 08:27:44