Dear Mladen,
How can I read the value of the Verified res and Verified Sup object or create a buffer for these values?
Thank you,
Rogério
Re: Supply and Demand Indicator value
2If you know the object name, you can simply do the following :borgesr wrote: Dear Mladen,
How can I read the value of the Verified res and Verified Sup object or create a buffer for these values?
Thank you,
Rogério
Code: Select all
double value = ObjectGetDouble(0,"object name here",OBJPROP_PRICE1);
Re: Supply and Demand Indicator value
3Hi Mladen
From what I understand in the code the name of the object starts with SSSR#S and is changed by a count.
It does not have a fixed name.
Code
Thank you,
Rogério
From what I understand in the code the name of the object starts with SSSR#S and is changed by a count.
It does not have a fixed name.
Code
Code: Select all
//name sup
if(zone_type[i]==ZONE_SUPPORT)
string s="SSSR#S"+i+" Strength=";
else
//name res
s="SSSR#R"+i+" Strength=";
if(zone_strength[i]==ZONE_PROVEN)
s=s+"Proven, Test Count="+zone_hits[i];
else if(zone_strength[i]==ZONE_VERIFIED)
s=s+"Verified, Test Count="+zone_hits[i];
else if(zone_strength[i]==ZONE_UNTESTED)
s=s+"Untested";
else if(zone_strength[i]==ZONE_TURNCOAT)
s=s+"Turncoat";
else
s=s+"Weak";
ObjectCreate(s,OBJ_RECTANGLE,0,0,0,0,0);
ObjectSet(s,OBJPROP_TIME1,Time[zone_start[i]]);
ObjectSet(s,OBJPROP_TIME2,Time[0]);
ObjectSet(s,OBJPROP_PRICE1,zone_hi[i]);
ObjectSet(s,OBJPROP_PRICE2,zone_lo[i]);
ObjectSet(s,OBJPROP_BACK,zone_solid);
ObjectSet(s,OBJPROP_WIDTH,zone_linewidth);
ObjectSet(s,OBJPROP_STYLE,zone_style);
if(zone_type[i]==ZONE_SUPPORT)
{
// support zone
if(zone_strength[i]==ZONE_TURNCOAT)
ObjectSet(s,OBJPROP_COLOR,color_support_turncoat);
else if(zone_strength[i]==ZONE_PROVEN)
ObjectSet(s,OBJPROP_COLOR,color_support_proven);
else if(zone_strength[i]==ZONE_VERIFIED)
ObjectSet(s,OBJPROP_COLOR,color_support_verified);
else if(zone_strength[i]==ZONE_UNTESTED)
ObjectSet(s,OBJPROP_COLOR,color_support_untested);
else
ObjectSet(s,OBJPROP_COLOR,color_support_weak);
}
else
{
// resistance zone
if(zone_strength[i]==ZONE_TURNCOAT)
ObjectSet(s,OBJPROP_COLOR,color_resist_turncoat);
else if(zone_strength[i]==ZONE_PROVEN)
ObjectSet(s,OBJPROP_COLOR,color_resist_proven);
else if(zone_strength[i]==ZONE_VERIFIED)
ObjectSet(s,OBJPROP_COLOR,color_resist_verified);
else if(zone_strength[i]==ZONE_UNTESTED)
ObjectSet(s,OBJPROP_COLOR,color_resist_untested);
else
ObjectSet(s,OBJPROP_COLOR,color_resist_weak);
}
Rogério
Re: Supply and Demand Indicator value
4You have to have some unique way of identifying it
Even if you store it to buffer, without knowing what value you want to store into the buffer (ie. value of what object should be stored to the buffer) it is pointless.
In both cases you have to know exactly the name of the object that you wish to read
Even if you store it to buffer, without knowing what value you want to store into the buffer (ie. value of what object should be stored to the buffer) it is pointless.
In both cases you have to know exactly the name of the object that you wish to read
Re: Supply and Demand Indicator value
5I tried to create the buffer below but the value is totally different from the text object.
Code: Select all
ObjectCreate(s,OBJ_RECTANGLE,0,0,0,0,0);
ObjectSet(s,OBJPROP_TIME1,Time[zone_start[i]]);
ObjectSet(s,OBJPROP_TIME2,Time[0]);
ObjectSet(s,OBJPROP_PRICE1,zone_hi[i]);
ObjectSet(s,OBJPROP_PRICE2,zone_lo[i]);
ObjectSet(s,OBJPROP_BACK,zone_solid);
ObjectSet(s,OBJPROP_WIDTH,zone_linewidth);
ObjectSet(s,OBJPROP_STYLE,zone_style);
srHI[i]=zone_hi[i]; // Resistence
srLO[i]=zone_lo[i]; // Support
Re: Supply and Demand Indicator value
6Of course that it is different - you are not limiting it to the exact nameborgesr wrote:I tried to create the buffer below but the value is totally different from the text object.
Code: Select all
ObjectCreate(s,OBJ_RECTANGLE,0,0,0,0,0); ObjectSet(s,OBJPROP_TIME1,Time[zone_start[i]]); ObjectSet(s,OBJPROP_TIME2,Time[0]); ObjectSet(s,OBJPROP_PRICE1,zone_hi[i]); ObjectSet(s,OBJPROP_PRICE2,zone_lo[i]); ObjectSet(s,OBJPROP_BACK,zone_solid); ObjectSet(s,OBJPROP_WIDTH,zone_linewidth); ObjectSet(s,OBJPROP_STYLE,zone_style); srHI[i]=zone_hi[i]; // Resistence srLO[i]=zone_lo[i]; // Support
Please try to limit it to exact name - otherwise nobody and no code can help you retrieve that value
Re: Supply and Demand Indicator value
8Dear Borgesr,borgesr wrote: Dear Mladen,
How can I read the value of the Verified res and Verified Sup object or create a buffer for these values?
Thank you,
Rogério
I would like to ask you if the indicator is repainting ????
Thank you for your info.
Best Regards
Dimitri
Re: Supply and Demand Indicator value
9It is based on highest high and lowest low (ie: it does)Dimitri wrote:Dear Borgesr,
I would like to ask you if the indicator is repainting ????
Thank you for your info.
Best Regards
Dimitri
Re: Supply and Demand Indicator value
10Dear Mladen,
Do you know any other alternative to this indicator that does not repaint?
Thank you,
Rogério
Do you know any other alternative to this indicator that does not repaint?
Thank you,
Rogério