Rene
Thank you very much for taking the time to do this...it's really useful for me as I try to learn by looking at the code to figure out what's actually going on, especially drawing anything on the chart is still quite a mystery for me! i know why Steve keeps away from indicators!
One other indicator that was coded by f451 (a SHF member) a few years back and i've been using is his VSA-Signals indicator. The indicator is working fine now, but one thing I've been trying to figure out is how to check the signals when the next bar closes up / down respectively, and then confirm the signal on the chart with a change of colour. I was thinking this might be able to be done with ObjectGetValueByShift( ); and waiting for the next bar, but how to do this is quite beyond me!
I have been using the indicator and shifting the bar back +1 but it would be nice to see both the unconfirmed & confirmed signals on the chart...then next is to make a dashboard!
Anyway its a really great indicator that other SHF members might find useful as is or modified
Code: Select all
int DisplaySignal(int s, int bar)
{
if (s==EMPTY_VALUE)
{ return(0);}
icolor = wrong_background; // if wrong background, show signal in gray
if (s < 9)
{
dprice = High[bar] + 0.1*CalcRange(bar, false);
if (background == weakness) // background weakness, signal weakness, mark with red
{ icolor = weakness_color; }
}
else
{
dprice = Low[bar] - 0.1*CalcRange(bar, false);
if (background == strength) // background strength, signal strength, mark with blue
{ icolor = strength_color; }
}
if (ObjectCreate(objprefix+" "+text[s]+" ("+bar+")", OBJ_ARROW, 0, Time[bar], dprice) == true)
{
ObjectSet(objprefix+" "+text[s]+" ("+bar+")", OBJPROP_ARROWCODE, code[s]);
ObjectSet(objprefix+" "+text[s]+" ("+bar+")", OBJPROP_COLOR, icolor);
SetIndexArrow(3,code[s]);
sctr++;
}
last_dprice = dprice; // might use last signal position to clear and rewrite signals for those that need confirmation
return(0);
}
You do not have the required permissions to view the files attached to this post.