Hello Alex,
Iknow u will solve this , i ve an indicator(hilbert) for TS which is in subgraph or at bottom in a pan, iwant it on price bars, what i ve to do?
The code is
inputs: Price((H + L)/2),
EntryVal(0),
EntryK(0),
ExitVal(0),
ExitK(0);
vars: Period(0),
count(0),
EntryLookBack(0),
ExitLookBack(0),
EntryChannel(0),
ExitChannel(0);
Period = HilbertPeriod(Price);
If EntryVal <> 0 then EntryLookBack = EntryVal else EntryLookBack = EntryK*Period;
if EntryLookBack < 1 then EntryLookBack = 1;
If ExitVal <> 0 then ExitLookBack = ExitVal else ExitLookBack = ExitK*Period;
if ExitLookBack < 1 then ExitLookBack = 1;
EntryChannel = 0;
for count = 1 to EntryLookBack begin
if EntryChannel < High[count] then EntryChannel = High[count];
end;
ExitChannel = 100000;
for count = 1 to ExitLookBack begin
if ExitChannel > Low[count] then ExitChannel = Low[count];
end;
plot1(EntryChannel, "EntryChannel");
plot2(ExitChannel, "ExitChannel");
If High > EntryChannel then plot3(EntryChannel, "Enter");
If Low < ExitChannel then plot4(ExitChannel, "Exit");
Iknow u will solve this , i ve an indicator(hilbert) for TS which is in subgraph or at bottom in a pan, iwant it on price bars, what i ve to do?
The code is
inputs: Price((H + L)/2),
EntryVal(0),
EntryK(0),
ExitVal(0),
ExitK(0);
vars: Period(0),
count(0),
EntryLookBack(0),
ExitLookBack(0),
EntryChannel(0),
ExitChannel(0);
Period = HilbertPeriod(Price);
If EntryVal <> 0 then EntryLookBack = EntryVal else EntryLookBack = EntryK*Period;
if EntryLookBack < 1 then EntryLookBack = 1;
If ExitVal <> 0 then ExitLookBack = ExitVal else ExitLookBack = ExitK*Period;
if ExitLookBack < 1 then ExitLookBack = 1;
EntryChannel = 0;
for count = 1 to EntryLookBack begin
if EntryChannel < High[count] then EntryChannel = High[count];
end;
ExitChannel = 100000;
for count = 1 to ExitLookBack begin
if ExitChannel > Low[count] then ExitChannel = Low[count];
end;
plot1(EntryChannel, "EntryChannel");
plot2(ExitChannel, "ExitChannel");
If High > EntryChannel then plot3(EntryChannel, "Enter");
If Low < ExitChannel then plot4(ExitChannel, "Exit");
Comment