Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 12:25:50 +0000



Post From: Drawing objects not showing up

[2018-05-08 21:54:22]
WarriorTrader - Posts: 245
Forgot to mention that here are many other drawing objects that are working just fine from the same study. For some reason the "MIGtarget2" does not want to work.

        int MIGCounter = 0;
        if (ShortLine)
          MIGCounter = -10;
        else
          MIGCounter = 10;

        for (int i = 1; i <= 4; i++) {

          MIGtarget.Clear();
          MIGtarget.Region = 0;
          MIGtarget.ChartNumber = sc.ChartNumber;
          MIGtarget.DrawingType = DRAWING_TEXT;
          //MIGtarget.LineNumber = 7766544 + DynamicLineNumber + (MIGCounter*i); //ChartDrawing.BeginValue+sc.ChartNumber+900;
          MIGtarget.AddMethod = UTAM_ADD_ALWAYS; //UTAM_ADD_OR_ADJUST; //UTAM_ADD_OR_ADJUST;
          MIGtarget.TextAlignment = DT_VCENTER | DT_RIGHT; //DT_CENTER;
          MIGtarget.AddAsUserDrawnDrawing = 1;

          if (ShortLine) //sellers
            MIGtarget.Color = RGB(255, 0, 91); //red
          else
            MIGtarget.Color = RGB(150, 255, 0); //blue


          MIGtarget.FontSize = 8;
          //MIGtarget.FontBold=1;
          MIGtarget.FontFace.Format("Tahoma");
          //MIGtarget.BeginValue = 0; //default
          MIGtarget.BeginDateTime = 150;

          Target = Location + (MIGCounter * i);
          MIGtarget.BeginValue = Target;
          if (ShortLine)

            MIGtarget.Text.Format("(%1.0d)-%2.0d", DayDistance, MIGCounter*i*-1);
          else
            MIGtarget.Text.Format("(%1.0d)+%2.0d", DayDistance, MIGCounter*i);

          sc.UseTool(MIGtarget);


          
          
          
//This object is not showing up          
          
          
          //For remote chart
          //this tool will not show up on the Order Flow Candle Stick chart, chart #1, error to work out
          MIGtarget2.Clear();
          //MIGtarget2.Region=0;
          MIGtarget2.ChartNumber = ProfileChartNum; //Market Profile chart //Remote1;
          MIGtarget2.DrawingType = DRAWING_MARKER;
          MIGtarget2.MarkerType = MARKER_STAR;
          //MIGtarget2.LineNumber = 8888777 + DynamicLineNumber + (MIGCounter*i);
          MIGtarget2.AddMethod = UTAM_ADD_ALWAYS; //UTAM_ADD_OR_ADJUST;
                                //MIGtarget2.TextAlignment = DT_VCENTER | DT_RIGHT; //DT_CENTER;
          MIGtarget2.AddAsUserDrawnDrawing = 1;

          if (ShortLine) //sellers
            MIGtarget2.Color = RGB(255, 0, 91); //red
          else
            MIGtarget2.Color = RGB(150, 255, 0); //blue

                               //MIGtarget2.FontSize = 8;
          MIGtarget2.BeginDateTime = 150;
          MIGtarget2.BeginValue = Target;

          sc.UseTool(MIGtarget2);


        } //for