1) Should place the entry before the exit in the PowerLanguage when the entry name is refered in exit? There's no such limitation in TS8. It's a big job for me to transfer all my TS8 system to MC to revise this issue.
2) variable declare as data alias, then put to function as serial parameter and numericref. In TS8, my system can refer expected information of the data2 but in MC is data1. the follow is some codes
Code: Select all
{Singal}
var: PivotHCntD2(0,data2);
{some codes not showed here}
TrendStatusD2 = _TrendStatusD2_adv
(LStren,RStren,EMALen,ShowTL,ShowText,
PivotHSetD2,PivotLSetD2, PivotHCntD2 ,PivotLCntD2,
PivotHighShowD2,PivotLowShowD2,
PivotValueD2,
EMA_D2,VolaCondition_D2,MATrend_D2,
BullTLExistD2,BearTLExistD2,
BullTLEndD2,BearTLEndD2);
{some codes not showed here}
{Function}
Input:PivotHCnt(NumericRef);
{some codes not showed here}
PivotValue = _PivotSetBoth_D2(LStren,RStren,PivotHSet,PivotLSet,
PivotHighShow,PivotLowShow,PivotHCnt,PivotLCnt);
{some codes not showed here}
{Function}
Input:PivotHCnt(NumericRef);
{some codes not showed here}
PivotHCnt = PivotHCnt;
if condition1 then
PivotHCnt = PivotHCnt[1] + 1;
{some codes not showed here}
In the 2nd bar, condition1 still true, then pivotHCnt is expected still 0 + 1;
However, in the PowerLanguage I print to output is 1 + 1; I think the value PivotHCnt[1] is refered to data1.
Please help! Thanks!