NexusFi: Find Your Edge


Home Menu

 





Bar Statistics MC64 Error


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one olobay with 4 posts (3 thanks)
    2. looks_two manifiestofx with 3 posts (0 thanks)
    3. looks_3 ABCTG with 3 posts (2 thanks)
    4. looks_4 simon14 with 1 posts (0 thanks)
    1. trending_up 3,433 views
    2. thumb_up 5 thanks given
    3. group 6 followers
    1. forum 11 posts
    2. attach_file 3 attachments




 
Search this Thread

Bar Statistics MC64 Error

  #1 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 364 since Jul 2011

Hi,

I am trying to modify this code to get it to show the % Delta value ( delta / volume of the bar) but the math is not working out and I can't figure it out. It compiles and plots, but the math is wrong. Help is greatly appreciated. Thanks. These are the parts that I changed:

 
Code
// Highest delta variation
if volume <> 0 then
   hiDeltaVari = ((myDelta / volume) * 100);
// Lowest delta variation
if volume <> 0 then 
   loDeltaVari = ((myDelta / volume) * 100);
 
Code
// set highest and lowest delta string variation
if myDelta > 0 then
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(hiDeltaVari, 0))) +} numtostr(hiDeltaVari, 1) + "%")
else
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(loDeltaVari, 0))) +} numtostr(loDeltaVari, 1) + "%");
Full modified code:

 
Code
// Plot the total, the highest and lowest delta
   {- Add Cumulative Delta as 2nd data series with the same resolution as the main data series 
      and base this study on that 2nd data series. Also set it to - Break on Session}

inputs:
   FontType            ("Lucida Sans Typewriter"),
   ShowLabels            (false), // labels each delta calculation
   LabelTextSize            (8),
   LabelColor            (darkgray),
   ShowDeltaHistory         (false), // plots delta calculations prior to today
   ShowHiLoVariation         (true), // plots percentage calculation of total delta against highest and lowest delta
   TextColor            (white),
   DeltaTextSize            (13),
   HiLoTextSize            (10),
   PlusDeltaColor         (blue),
   MinusDeltaColor         (red),
   DeltaLocation            (1.4), // text location on the subchart 
   VariLocation            (0.9), // text location on the subchart 
   HiDeltaLocation         (0.5), // text location on the subchart 
   LoDeltaLocation         (0); // text location on the subchart 

variables:
   myDelta            (0),
   myHighDelta            (0),
   myLowDelta            (0),
   hiDeltaVari            (0),
   loDeltaVari            (0),
   deltaTXT            (-1),
   highTXT            (-1),
   lowTXT               (-1),
   variTXT            (-1),
   myDeltaTXT            (-1),
   myHighTXT            (-1),
   myLowTXT            (-1),
   deltaVariTXT            (-1);

if currentbar =  1 then begin
   // Label text
   if ShowLabels = true then begin
      deltaTXT= text_new_self_s(date, time_s, DeltaLocation, "");
         text_setfontname(deltaTXT, FontType);
         text_setsize(deltaTXT, LabelTextSize);
         text_setstyle(deltaTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(deltaTXT, LabelColor);

      highTXT= text_new_self_s(date, time_s, HiDeltaLocation, "");
         text_setfontname(highTXT, FontType);
         text_setsize(highTXT, LabelTextSize);
         text_setstyle(highTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(highTXT, LabelColor);

      lowTXT= text_new_self_s(date, time_s, LoDeltaLocation, "");
         text_setfontname(lowTXT, FontType);
         text_setsize(lowTXT, LabelTextSize);
         text_setstyle(lowTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(lowTXT, LabelColor);
      
      if ShowHiLoVariation = true then begin
         variTXT= text_new_self_s(date, time_s, VariLocation, "");
            text_setfontname(variTXT, FontType);
            text_setsize(variTXT, LabelTextSize);
            text_setstyle(variTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
            text_setcolor(variTXT, LabelColor);
            //text_setbgcolor(variTXT, black);
      end;
   end;
end;
   
if date <> date[1] then begin
   // Delta prices
   myDelta = close;
   myHighDelta = high;
   myLowDelta = low;
end
else begin
   // Delta prices
   myDelta = close - close[1];   
   myHighDelta = high - close[1];
   myLowDelta = low -  close[1];
end;

// Highest delta variation
if volume <> 0 then
   hiDeltaVari = ((myDelta / volume) * 100);
// Lowest delta variation
if volume <> 0 then 
   loDeltaVari = ((myDelta / volume) * 100);

// Total, highest and lowest delta text
if ShowDeltaHistory = true or (ShowDeltaHistory = false and date = LastCalcDate) then begin
   myDeltaTXT = text_new_self_s(date, time_s, DeltaLocation, "");
      text_setfontname(myDeltaTXT, FontType);
      text_setsize(myDeltaTXT, 13);
      text_setstyle(myDeltaTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myDeltaTXT, TextColor);

   myHighTXT= text_new_self_s(date, time_s, HiDeltaLocation, "");
      text_setfontname(myHighTXT, FontType);
      text_setsize(myHighTXT, 10);
      text_setstyle(myHighTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myHighTXT, TextColor);
      
   myLowTXT= text_new_self_s(date, time_s, LoDeltaLocation, "");
      text_setfontname(myLowTXT, FontType);
      text_setsize(myLowTXT, 10);
      text_setstyle(myLowTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myLowTXT, TextColor);

      if ShowHiLoVariation = true then begin
         deltaVariTXT= text_new_self_s(date, time_s, VariLocation, "");
            text_setfontname(deltaVariTXT, FontType);
            text_setsize(deltaVariTXT, HiLoTextSize);
            text_setstyle(deltaVariTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
            text_setcolor(deltaVariTXT, TextColor);
      end;
end;

// set highest and lowest delta string variation
if myDelta > 0 then
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(hiDeltaVari, 0))) +} numtostr(hiDeltaVari, 1) + "%")
else
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(loDeltaVari, 0))) +} numtostr(loDeltaVari, 1) + "%");

// set delta string
text_setstring(myDeltaTXT, {spaces(5 - strlen(numtostr(myDelta, 0))) +} numtostr(myDelta, 0));

// set delta string background color
   if myDelta > 0 then
      text_setbgcolor(myDeltaTXT, PlusDeltaColor)
   else
      text_setbgcolor(myDeltaTXT, MinusDeltaColor); 

// set highest delta string and background color
if myHighDelta > 0 then                                               
   text_setstring(myHighTXT, spaces(8 - strlen(numtostr(myHighDelta, 0))) + numtostr(myHighDelta, 0))
else
   text_setstring(myHighTXT, spaces(8 - strlen(numtostr(myHighDelta, 0))) + "0");
   text_setbgcolor(myHighTXT, PlusDeltaColor);

// set lowest delta string and background color   
if myLowDelta < 0 then   
   text_setstring(myLowTXT, spaces(8 - strlen(numtostr(myLowDelta, 0))) + numtostr(myLowDelta, 0))
else
   text_setstring(myLowTXT, spaces(8 - strlen(numtostr(myLowDelta, 0))) + "0");
   text_setbgcolor(myLowTXT, MinusDeltaColor);

// set labels string and location
text_setlocation_s(deltaTXT, date, time_s, DeltaLocation);
text_setstring(deltaTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Total Delta");

text_setlocation_s(variTXT, date, time_s, VariLocation);
text_setstring(variTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "% Delta");

text_setlocation_s(highTXT, date, time_s, HiDeltaLocation);
text_setstring(highTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Max Delta");

text_setlocation_s(lowTXT, date, time_s, LoDeltaLocation);
text_setstring(lowTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Min Delta");

Original code:

 
Code
// Plot the total, the highest and lowest delta
   {- Add Cumulative Delta as 2nd data series with the same resolution as the main data series 
      and base this study on that 2nd data series. Also set it to - Break on Session}

inputs:
   FontType            ("Lucida Sans Typewriter"),
   ShowLabels            (false), // labels each delta calculation
   LabelTextSize            (8),
   LabelColor            (darkgray),
   ShowDeltaHistory         (false), // plots delta calculations prior to today
   ShowHiLoVariation         (true), // plots percentage calculation of total delta against highest and lowest delta
   TextColor            (white),
   DeltaTextSize            (13),
   HiLoTextSize            (10),
   PlusDeltaColor         (blue),
   MinusDeltaColor         (red),
   DeltaLocation            (1.4), // text location on the subchart 
   VariLocation            (0.9), // text location on the subchart 
   HiDeltaLocation         (0.5), // text location on the subchart 
   LoDeltaLocation         (0); // text location on the subchart 

variables:
   myDelta            (0),
   myHighDelta            (0),
   myLowDelta            (0),
   hiDeltaVari            (0),
   loDeltaVari            (0),
   deltaTXT            (-1),
   highTXT            (-1),
   lowTXT               (-1),
   variTXT            (-1),
   myDeltaTXT            (-1),
   myHighTXT            (-1),
   myLowTXT            (-1),
   deltaVariTXT            (-1);

if currentbar =  1 then begin
   // Label text
   if ShowLabels = true then begin
      deltaTXT= text_new_self_s(date, time_s, DeltaLocation, "");
         text_setfontname(deltaTXT, FontType);
         text_setsize(deltaTXT, LabelTextSize);
         text_setstyle(deltaTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(deltaTXT, LabelColor);

      highTXT= text_new_self_s(date, time_s, HiDeltaLocation, "");
         text_setfontname(highTXT, FontType);
         text_setsize(highTXT, LabelTextSize);
         text_setstyle(highTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(highTXT, LabelColor);

      lowTXT= text_new_self_s(date, time_s, LoDeltaLocation, "");
         text_setfontname(lowTXT, FontType);
         text_setsize(lowTXT, LabelTextSize);
         text_setstyle(lowTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(lowTXT, LabelColor);
      
      if ShowHiLoVariation = true then begin
         variTXT= text_new_self_s(date, time_s, VariLocation, "");
            text_setfontname(variTXT, FontType);
            text_setsize(variTXT, LabelTextSize);
            text_setstyle(variTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
            text_setcolor(variTXT, LabelColor);
            //text_setbgcolor(variTXT, black);
      end;
   end;
end;
   
if date <> date[1] then begin
   // Delta prices
   myDelta = close;
   myHighDelta = high;
   myLowDelta = low;
end
else begin
   // Delta prices
   myDelta = close - close[1];   
   myHighDelta = high - close[1];
   myLowDelta = low -  close[1];
end;

// Highest delta variation
if myHighDelta <> 0 then
   hiDeltaVari = ((myDelta / myHighDelta) - 1) * 100;
// Lowest delta variation
if myLowDelta <> 0 then 
   loDeltaVari = ((myDelta / myLowDelta) - 1) * 100;

// Total, highest and lowest delta text
if ShowDeltaHistory = true or (ShowDeltaHistory = false and date = LastCalcDate) then begin
   myDeltaTXT = text_new_self_s(date, time_s, DeltaLocation, "");
      text_setfontname(myDeltaTXT, FontType);
      text_setsize(myDeltaTXT, 13);
      text_setstyle(myDeltaTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myDeltaTXT, TextColor);

   myHighTXT= text_new_self_s(date, time_s, HiDeltaLocation, "");
      text_setfontname(myHighTXT, FontType);
      text_setsize(myHighTXT, 10);
      text_setstyle(myHighTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myHighTXT, TextColor);
      
   myLowTXT= text_new_self_s(date, time_s, LoDeltaLocation, "");
      text_setfontname(myLowTXT, FontType);
      text_setsize(myLowTXT, 10);
      text_setstyle(myLowTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myLowTXT, TextColor);

      if ShowHiLoVariation = true then begin
         deltaVariTXT= text_new_self_s(date, time_s, VariLocation, "");
            text_setfontname(deltaVariTXT, FontType);
            text_setsize(deltaVariTXT, HiLoTextSize);
            text_setstyle(deltaVariTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
            text_setcolor(deltaVariTXT, TextColor);
      end;
end;

// set highest and lowest delta string variation
if myDelta > 0 then
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(hiDeltaVari, 0))) +} numtostr(hiDeltaVari, 0) + "%")
else
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(loDeltaVari, 0))) +} numtostr(absValue(loDeltaVari), 0) + "%");

// set delta string
text_setstring(myDeltaTXT, {spaces(5 - strlen(numtostr(myDelta, 0))) +} numtostr(myDelta, 0));

// set delta string background color
   if myDelta > 0 then
      text_setbgcolor(myDeltaTXT, PlusDeltaColor)
   else
      text_setbgcolor(myDeltaTXT, MinusDeltaColor); 

// set highest delta string and background color
if myHighDelta > 0 then                                               
   text_setstring(myHighTXT, spaces(8 - strlen(numtostr(myHighDelta, 0))) + numtostr(myHighDelta, 0))
else
   text_setstring(myHighTXT, spaces(8 - strlen(numtostr(myHighDelta, 0))) + "0");
   text_setbgcolor(myHighTXT, PlusDeltaColor);

// set lowest delta string and background color   
if myLowDelta < 0 then   
   text_setstring(myLowTXT, spaces(8 - strlen(numtostr(myLowDelta, 0))) + numtostr(myLowDelta, 0))
else
   text_setstring(myLowTXT, spaces(8 - strlen(numtostr(myLowDelta, 0))) + "0");
   text_setbgcolor(myLowTXT, MinusDeltaColor);

// set labels string and location
text_setlocation_s(deltaTXT, date, time_s, DeltaLocation);
text_setstring(deltaTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Total Delta");

text_setlocation_s(variTXT, date, time_s, VariLocation);
text_setstring(variTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Total Delta %");

text_setlocation_s(highTXT, date, time_s, HiDeltaLocation);
text_setstring(highTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Highest Delta");

text_setlocation_s(lowTXT, date, time_s, LoDeltaLocation);
text_setstring(lowTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Lowest Delta");

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Hi olobay,

did you check the internal values that the code uses in its computations versus what you are using on the chart? For example depending on the bar type, the reserved volume will not return the actual volume. Take a look at the build in Volume indicator to see how to get the correct value depending on the bar type.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 364 since Jul 2011


Once again and as always, you have been very helpful @ABCTG. Thank you very much.

Here is the code if anyone in interested.

 
Code
// Plot the total, the highest and lowest delta
   {- Add Cumulative Delta as 2nd data series with the same resolution as the main data series 
      and base this study on that 2nd data series. Also set it to - Break on Session}

inputs:
   FontType            ("Lucida Sans Typewriter"),
   ShowLabels            (false), // labels each delta calculation
   LabelTextSize            (8),
   LabelColor            (darkgray),
   ShowDeltaHistory         (false), // plots delta calculations prior to today
   ShowHiLoVariation         (true), // plots percentage calculation of total delta against highest and lowest delta
   TextColor            (white),
   DeltaTextSize            (13),
   HiLoTextSize            (10),
   PlusDeltaColor         (blue),
   MinusDeltaColor         (red),
   DeltaLocation            (1.4), // text location on the subchart 
   VariLocation            (0.9), // text location on the subchart 
   HiDeltaLocation         (0.5), // text location on the subchart 
   LoDeltaLocation         (0); // text location on the subchart 

variables:
   myDelta            (0),
   myHighDelta            (0),
   myLowDelta            (0),
   hiDeltaVari            (0),
   loDeltaVari            (0),
   deltaTXT            (-1),
   highTXT            (-1),
   lowTXT               (-1),
   variTXT            (-1),
   myDeltaTXT            (-1),
   myHighTXT            (-1),
   myLowTXT            (-1),
   deltaVariTXT            (-1),
   volumevalue		(0);

if currentbar =  1 then begin
   // Label text
   if ShowLabels = true then begin
      deltaTXT= text_new_self_s(date, time_s, DeltaLocation, "");
         text_setfontname(deltaTXT, FontType);
         text_setsize(deltaTXT, LabelTextSize);
         text_setstyle(deltaTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(deltaTXT, LabelColor);

      highTXT= text_new_self_s(date, time_s, HiDeltaLocation, "");
         text_setfontname(highTXT, FontType);
         text_setsize(highTXT, LabelTextSize);
         text_setstyle(highTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(highTXT, LabelColor);

      lowTXT= text_new_self_s(date, time_s, LoDeltaLocation, "");
         text_setfontname(lowTXT, FontType);
         text_setsize(lowTXT, LabelTextSize);
         text_setstyle(lowTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(lowTXT, LabelColor);
      
      if ShowHiLoVariation = true then begin
         variTXT= text_new_self_s(date, time_s, VariLocation, "");
            text_setfontname(variTXT, FontType);
            text_setsize(variTXT, LabelTextSize);
            text_setstyle(variTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
            text_setcolor(variTXT, LabelColor);
            //text_setbgcolor(variTXT, black);
      end;
   end;
end;
   
if date <> date[1] then begin
   // Delta prices
   myDelta = close;
   myHighDelta = high;
   myLowDelta = low;
end
else begin
   // Delta prices
   myDelta = close - close[1];   
   myHighDelta = high - close[1];
   myLowDelta = low -  close[1];
end;

if BarType >= 2 and BarType < 5 then VolumeValue = Volume
else 
VolumeValue = Ticks ;

// Highest delta variation
if volumevalue <> 0 then
   hiDeltaVari = ((myDelta / volumevalue) * 100);
// Lowest delta variation
if volumevalue <> 0 then 
   loDeltaVari = ((myDelta / volumevalue) * 100);

// Total, highest and lowest delta text
if ShowDeltaHistory = true or (ShowDeltaHistory = false and date = LastCalcDate) then begin
   myDeltaTXT = text_new_self_s(date, time_s, DeltaLocation, "");
      text_setfontname(myDeltaTXT, FontType);
      text_setsize(myDeltaTXT, 13);
      text_setstyle(myDeltaTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myDeltaTXT, TextColor);

   myHighTXT= text_new_self_s(date, time_s, HiDeltaLocation, "");
      text_setfontname(myHighTXT, FontType);
      text_setsize(myHighTXT, 10);
      text_setstyle(myHighTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myHighTXT, TextColor);
      
   myLowTXT= text_new_self_s(date, time_s, LoDeltaLocation, "");
      text_setfontname(myLowTXT, FontType);
      text_setsize(myLowTXT, 10);
      text_setstyle(myLowTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myLowTXT, TextColor);

      if ShowHiLoVariation = true then begin
         deltaVariTXT= text_new_self_s(date, time_s, VariLocation, "");
            text_setfontname(deltaVariTXT, FontType);
            text_setsize(deltaVariTXT, HiLoTextSize);
            text_setstyle(deltaVariTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
            text_setcolor(deltaVariTXT, TextColor);
      end;
end;

// set highest and lowest delta string variation
if myDelta > 0 then
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(hiDeltaVari, 0))) +} numtostr(hiDeltaVari, 1) + "%")
else
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(loDeltaVari, 0))) +} numtostr(loDeltaVari, 1) + "%");

// set delta string
text_setstring(myDeltaTXT, {spaces(5 - strlen(numtostr(myDelta, 0))) +} numtostr(myDelta, 0));

// set delta string background color
   if myDelta > 0 then
      text_setbgcolor(myDeltaTXT, PlusDeltaColor)
   else
      text_setbgcolor(myDeltaTXT, MinusDeltaColor); 

// set highest delta string and background color
if myHighDelta > 0 then                                               
   text_setstring(myHighTXT, spaces(8 - strlen(numtostr(myHighDelta, 0))) + numtostr(myHighDelta, 0))
else
   text_setstring(myHighTXT, spaces(8 - strlen(numtostr(myHighDelta, 0))) + "0");
   text_setbgcolor(myHighTXT, PlusDeltaColor);

// set lowest delta string and background color   
if myLowDelta < 0 then   
   text_setstring(myLowTXT, spaces(8 - strlen(numtostr(myLowDelta, 0))) + numtostr(myLowDelta, 0))
else
   text_setstring(myLowTXT, spaces(8 - strlen(numtostr(myLowDelta, 0))) + "0");
   text_setbgcolor(myLowTXT, MinusDeltaColor);

// set labels string and location
text_setlocation_s(deltaTXT, date, time_s, DeltaLocation);
text_setstring(deltaTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Total Delta");

text_setlocation_s(variTXT, date, time_s, VariLocation);
text_setstring(variTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "% Delta");

text_setlocation_s(highTXT, date, time_s, HiDeltaLocation);
text_setstring(highTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Max Delta");

text_setlocation_s(lowTXT, date, time_s, LoDeltaLocation);
text_setstring(lowTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Min Delta");

Started this thread Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Hi @olobay,

thank you very much for the feedback and good job in fixing your code.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
 
simon14's Avatar
 simon14 
TORONTO
 
Experience: Advanced
Platform: multi charts
Trading: crude cl
Posts: 19 since Sep 2016
Thanks Given: 10
Thanks Received: 6

Thanks ! been looking for this.

Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	236
Size:	69.5 KB
ID:	253920  
Reply With Quote
  #6 (permalink)
manifiestofx
Medellin
 
Posts: 3 since Sep 2017
Thanks Given: 1
Thanks Received: 0

Hi, thank you for this code.
I am not a programmer, but I have been trying to copy this code to PowerLanguage and compile and I have no idea how to do it
Is it possible that you post the code compiled as an indicator ready to add to Multicharts?
Thank you again for any help...

Reply With Quote
  #7 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 364 since Jul 2011


manifiestofx View Post
Hi, thank you for this code.
I am not a programmer, but I have been trying to copy this code to PowerLanguage and compile and I have no idea how to do it
Is it possible that you post the code compiled as an indicator ready to add to Multicharts?
Thank you again for any help...

Here is the .pla. Go to PowerLanguage Editor and then File--Import.

Attached Files
Elite Membership required to download: Bar Stats.pla
Started this thread Reply With Quote
  #8 (permalink)
manifiestofx
Medellin
 
Posts: 3 since Sep 2017
Thanks Given: 1
Thanks Received: 0

That was fast!

Except that when I go to Import the file, the extension .PLA does not shows up; it seems that the free version of Multicharts .. NET version .PLN extension is not compatible with the regular version .PLA

I looked for answers for this issue, but I canīt post the URL.. in summary, i would not know how to convert one extension to another.

I donīt know what should I do next, please help...

Thanks again!

Reply With Quote
  #9 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 364 since Jul 2011

I am using MC with EasyLanguage. MC NET version uses C# I think. The indicator will not work for MC NET as it is coded in EasyLanguage. Unfortunately, I can't help you with C# as I don't know anything about C#. Sorry.

Started this thread Reply With Quote
  #10 (permalink)
manifiestofx
Medellin
 
Posts: 3 since Sep 2017
Thanks Given: 1
Thanks Received: 0



olobay View Post
I am using MC with EasyLanguage. MC NET version uses C# I think. The indicator will not work for MC NET as it is coded in EasyLanguage. Unfortunately, I can't help you with C# as I don't know anything about C#. Sorry.

Ok, thanks for sharing it, it is a shame that i canīt use it.
Do you know where can i find a code that do the same with Delta in MC? (I know i must to do the search, but i have to ask anyway)
Thanks for your help.

Reply With Quote




Last Updated on June 19, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts