How to set Engulfing like that, candle id 1 wick engulf candle id 2.. almost try but still fail,,
-
bolded text -
@mywife did you search the forum? There are tons of examples to get inspiration from
-
@ambrogio I did and try many time but still not same
.
.
I don't know to read this..
.
.
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime& time[],
const double& open[],
const double& high[],
const double& low[],
const double& close[],
const long& tick_volume[],
const long& volume[],
const int& spread[])
{
int limit = rates_total - prev_calculated;
//--- counting from 0 to rates_total
ArraySetAsSeries(Buffer1, true);
//--- initial zero
if(prev_calculated < 1)
{
ArrayInitialize(Buffer1, EMPTY_VALUE);
}
else
limit++;//--- main loop
for(int i = limit-1; i >= 0; i--)
{
if (i >= MathMin(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation//Indicator Buffer 1 if(Low[1+i] > Low[i] //Candlestick Low > Candlestick Low && High[1+i] < High[i] //Candlestick High < Candlestick High ) { Buffer1[i] = Low[i]; //Set indicator value at Candlestick Low if(i == 0 && Time[0] != time_alert) { myAlert("indicator", "Buy"); time_alert = Time[0]; } //Instant alert, only once per bar } else { Buffer1[i] = EMPTY_VALUE; } }return(rates_total);
}
//+------------------------------------------------------------------+ -
im not exactly sure what the problem is. I see you pointing to candle ID's and saying engulfing, I see a trade but you haven't explained what you are trying to achieve and whats failing.
-



