PureBytes Links
Trading Reference Links
|
It's amazing to me how you think you have the coding just perfect, and then
you see another problem with the code.
I believe this is a final version of what is necessary to code
1- data2 that is a longer time-frame than data1
2- where the indicator uses a calculated value, rather than merely an
input
Barry
==================================================
inputs:
lenStoch_data2(13),
len2Stoch_data2(3);
variable:
StochCritLg_Trend2(false),
FstK(0, data2),
SloK(0, data2);
{Stoch for Data2. I used stochastics per Perry Kaufman in "Trading Systems
& Methods" pg 136}
Value51 = Lowest(Low data2, lenStoch_data2);
Value52 = Highest(High data2, lenStoch_data2) - Value51;
Value53 = Close data2;
If Value52 > 0 Then
FstK = (Value53 - Value51) / Value52 * 100
Else
FstK = 0;
SloK = XAverage(FstK,len2Stoch_data2) data2;
If slok > slok[1] then
StochCritLg_Trend2 = true
else StochCritLg_Trend2 = false ;
Condition1 = Close > Open ;
if Condition1 and StochCritLg_Trend2 then
Plot1(low,"Lentry");
|