PureBytes Links
Trading Reference Links
|
For those who might need to code a situtation where data2 is a different
time frame than data1, the solution to the problem was to modify MA2 so that
"data2" was placed outside the parenthesis.
I found the answer in an old Omega System Trading and Development Club
volume example.
Barry
===========================================
inputs:
timepd1( 0930 ),
timepd2( 1130 ),
timepd3( 1330 ),
timepd4( 1600 ),
MALength( 20 ) ,
Price(close);
variable:
BuySig( 0 ),
SellSig( 0 ),
OK2Trade( false ),
MA2( 0 ) ;
MA2 = AverageFC( price, MALength )data2;
if time >= timepd1 and time <= timepd4 then
OK2trade = true
else OK2trade = false ;
{Calculate Data1}
Condition1 = Close > Open ;
Condition2 = close data2 > MA2;
if OK2trade and Condition1 and condition2 then
Plot1(High,"Lentry");
Print( Date, Time, " ", "MA2", MA2 ) ;
|