Here is the code I have written code someone with more coding skills then me take a look and help me to correct this as I am not sure what I am missing.
Code: Select all
Inputs:
SDLen (100),
NSD ( 2 );
Variables:
vSDEnt(0);
vSDEnt = StandardDev( c, SDLen, 2 );
{ Variables for entry and exit prices }
Value1 = vSDEnt * NSD;
variables:
vMP (0),
EntPrL (0),
EntPrS (0);
vMP = marketposition;
EntPrL = c[1] - value1;
EntPrS = c[1] + value1;
if currentbar >2 and vMP = 0 then
begin
Buy currentbar at EntPrL Limit;
and
Sellshort Currentbar at EntPrS limit;
end;