Brisbane, Australia
Posts: 7 since Jan 2013
Thanks Given: 14
Thanks Received: 0
|
Hi there,
Trying to work with the ParabolicSAR(AfStep, AfLimit,oParCl(0),oParOp(0),oPosition(0),oTransition(0)) function and getting some strange results when returning historical values of oParCl(0).
-------------------------------------------------------------------------------------
Here's the relevant part of my code:
// PSAR test
Condition1 = var0 < open AND var0[1] > open[1];
Condition2 = var0 > open AND var0[1] < open[1];
IF condition1 then
BUY Round(Risklow*PositionSize,0) CONTRACTS NEXT BAR at MARKET
end;
if condition2 then
SellShort Round(Risklow*PositionSize,0) CONTRACTS NEXT BAR at MARKET
end;
-------------------------------------------------------------------------------------
When using the print() command, the var0[1] values are completely different to those plotted on the chart 1 bar ago!
I've used the same inputs for both the Afstep and Aflimit in both the strategy and the indicator on the chart. Time period is 3hr bars.
Any ideas?
Thanks!
|