I've been through every post on several sites on this topic, and it still doesn't seem to work. My epiphany came yesterday on how it actually works, but alas it still didn't work. Any Help?
I'm trying to find the Highest(Lowest) High(Low) of the last 32days, and buy or sell based on a bid or ask above or below.
Here's the code:
int high32 = High[iHighest( NULL, PERIOD_D1, MODE_HIGH, 32, 1)];
NormalizeDouble(high32,Digits);
int low32 = Low[iLowest( NULL, PERIOD_D1, MODE_LOW, 32, 1)];
NormalizeDouble(low32,Digits);
I also tried to break the formulas into 2 different lines:
int bval = iHighest( NULL, PERIOD_D1, MODE_HIGH, 32, 1)];
double h32 = High[bval];
int sval = iLowest( NULL, PERIOD_D1, MODE_LOW, 32, 1)];
double l32 = Low[sval];
But to no avail, it still indecriminately opens and closes trades based on something else?
I'm trying to find the Highest(Lowest) High(Low) of the last 32days, and buy or sell based on a bid or ask above or below.
Here's the code:
int high32 = High[iHighest( NULL, PERIOD_D1, MODE_HIGH, 32, 1)];
NormalizeDouble(high32,Digits);
int low32 = Low[iLowest( NULL, PERIOD_D1, MODE_LOW, 32, 1)];
NormalizeDouble(low32,Digits);
I also tried to break the formulas into 2 different lines:
int bval = iHighest( NULL, PERIOD_D1, MODE_HIGH, 32, 1)];
double h32 = High[bval];
int sval = iLowest( NULL, PERIOD_D1, MODE_LOW, 32, 1)];
double l32 = Low[sval];
But to no avail, it still indecriminately opens and closes trades based on something else?