PureBytes Links
Trading Reference Links
|
I am trying to code a Gann concept for identifying potential support and
resistance. I would like to draw a series of horizontal lines across the
screen (or in proximity to the current price) such that the first or key
line -- Value2 -- is calculated as follows:
Input: Incremt(0.125), Price(C);
Value1 = IntPortion(SquareRoot(Price));
Value2 = Square(Value1);
Plot1(Value2,"Int_SQ");
The difficulty comes in drawing the additional lines which are calculated as
follows:
Square(Value1 + X * Incremt) where X is -8 to +8 { 1 / incremt = 8 }
Square(Value1 + 2* Incremt); , etc.
I know EL limits me to 4 plot statements in an indicator. Is is possible to
write the code for plotting multiple horizontal lines without using a single
plot statement for each line?
The incremental lines drawn should range between Value2 - 1 to Value2 + 1.
So if Value2 was 54 then 8 lines (since increment = .125) would be drawn
from 53 to 54 and 8 more from 54 to 55.
I would appreciate any help or suggestions.
Karl Schreiber kschr@xxxxxxxxxxx
|