[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Complicated coding question (or maybe not!)



PureBytes Links

Trading Reference Links

Hello Shraga(Feivi-Philip),
The solution I gave yesterday only calculates the two smallest values
not what you asked for, which was to plot the two lines that have the
smallest difference between them.
I'll try again

Pivot = ((HighD+LowD+CloseD)/3);
Resis2 = (Pivot+ (HighD - LowD));
Resis1 = 2*Pivot-LowD;
Supp1 = 2*Pivot-HighD;
Supp2 = (Pivot- (HighD - LowD));

VarA = Resis2 - Resis1;
VarB = Resis1 - Pivot;
VarC = Pivot - Supp1;
VarD = Supp1 - Supp2;
VarE = (MinList(VarA, VarB, VarC, VarD));
if VarE = VarA then begin
Plot1(Resis2,"xx");
Plot2(Resis1,"yy");
end;
if VarE = VarB then begin
Plot1(Resis1,"xx");
Plot2(Pivot,"yy");
end;
if VarE = VarC then begin
Plot1(Pivot,"xx");
Plot2(Supp1,"yy");
end;
if VarE = VarD then begin
Plot1(Supp1,"xx");
Plot2(Supp2,"yy");
end;


f> You can calculate the differences and store them as variables then plot the lowest two variables.
f> Just as an example, not tested
f> Res2 - Res1 = VarA
f> Res1 - Pivot = VarB
f> Pivot - Supp1 = VarC
f> Supp1 - Supp2 = VarD
f> Plot1(MinList(VarA, VarB, VarC, VarD,"MinList"))
f> Plot2(MinList2(VarA, VarB, VarC, VarD,"MinList2"))
f> best regards
f> foolsgold


SFP>> Hi everyone,
SFP>> Having a bunch of values, how can I tell EL to only acknowledge (for the
SFP>> purpose of plotting) those that have the smallest different between them? 
SFP>> I've currently coded an indicator that gives me several S&R values in the 
SFP>> market, based on different calculations. Now I'd like EL to "see" which 
SFP>> ones are closest together, and to only plot those, i.e. to be left with S&R 
SFP>> convergence levels. Is this at all possible?
SFP>> TIA!