I am having trouble back testing a strategy based on a P&F chart. Currently the simple strategy is GoLong when an up bar starts and GoShort when a down bar starts. In order to get in at the start of the bar I am having to do the following :-
if (Historical)
{
if (Open[0] < Close[1])
EnterLong();
if (Open[0] > Close[1])
EnterShort();
}
elseif (!Historical)
{
if (Open[0] > Close[1])
EnterLong();
if (Open[0] < Close[1])
EnterShort();
}
This is baffling to me !
Thanks for any help
regards dave

Comment