STOCHMI
Created at 04 Mar 2016, 04:01
CE
STOCHMI
04 Mar 2016, 04:01
I create A STOCH MI indicator:
and i ceate a robot with the data from that indicator for trigger:
-the graph show on M30 2 ligne that pass close to each other but not cross over ....
-but i reseave data from the indicator that they cross over :
What i can do to reseave only the onbar data from the indicator:
Result[index] = _smi[index] * 100; MaResult[index] = _maSmi.Result[index] * 100; if (MaResult.Last(1) >= Result.Last(1) && MaResult.LastValue <= Result.LastValue ) { Print("checkbuy{0} > {1} AND {2} < {3}", MaResult.Last(1), Result.Last(1), MaResult.LastValue, Result.LastValue); } if (MaResult.Last(1) <= Result.Last(1) && MaResult.LastValue >= Result.LastValue ) { Print("checksell {0} < {1} AND {2} > {3}", MaResult.Last(1), Result.Last(1), MaResult.LastValue, Result.LastValue); }
croucrou
13 Mar 2016, 19:02
Use Last(2) instead of Last(1) and Last(1) instead of LastValue?
@croucrou