I am working on an indicator and have it all done except one component. I would appreciate guidance of how to code this last piece.
------
It successfully puts a vertical line at the highest bar right now:
if (ObjectFind("T0") != 0)
{
ObjectCreate("T0",OBJ_VLINE,0,Time[highest_bar],0);
ObjectSet("T0",OBJPROP_COLOR,GridColor);
ObjectSet("T0",OBJPROP_WIDTH,1);
ObjectSet("T0",OBJPROP_STYLE,STYLE_DOT);
}
else
{
ObjectMove("T0", 0,Time[highest_bar],0);
}
Next, I want it to put another vertical line "x" number of places to the right.
I have a calculation in the code on what the "x" is (which already proves to be working in other outputs):
TP = MathRound(MathSqrt(mHigh)*10);
I tried doing Time[highest_bar]+TP and Time[highest_bar+TP] (okay, don't laugh at me :o) but it wants an integar. Thus, I am stomped: I don't know how to make the place shift "TP" number of spaces.
ObjectCreate("T1",OBJ_VLINE,0,Time[highest_bar]+TP,0);
Could you help me? I would appreciate it!
-Stearno
------
It successfully puts a vertical line at the highest bar right now:
if (ObjectFind("T0") != 0)
{
ObjectCreate("T0",OBJ_VLINE,0,Time[highest_bar],0);
ObjectSet("T0",OBJPROP_COLOR,GridColor);
ObjectSet("T0",OBJPROP_WIDTH,1);
ObjectSet("T0",OBJPROP_STYLE,STYLE_DOT);
}
else
{
ObjectMove("T0", 0,Time[highest_bar],0);
}
Next, I want it to put another vertical line "x" number of places to the right.
I have a calculation in the code on what the "x" is (which already proves to be working in other outputs):
TP = MathRound(MathSqrt(mHigh)*10);
I tried doing Time[highest_bar]+TP and Time[highest_bar+TP] (okay, don't laugh at me :o) but it wants an integar. Thus, I am stomped: I don't know how to make the place shift "TP" number of spaces.
ObjectCreate("T1",OBJ_VLINE,0,Time[highest_bar]+TP,0);
Could you help me? I would appreciate it!
-Stearno