Hi pgd,
Hope I can help.
The H1 green arrows just replicate the H1 traffic light bar (as it was at the close of the H1 bar)
The relevant part of traffic light code (the indi in Bob's package - 10.6B1H dummy lights 10.28.mq4) is;
Code: Select all
extern string ma1 = "Slow MA period";
extern int ma1Period = 240;
extern string ma2 = "Fast MA period";
extern int ma2Period = 60;
extern string ma3 = "Signal MA period";
extern int ma3Period = 15;
// .....
double maSlowH1 = iMA(NULL,PERIOD_H1,ma1Period,0,maMethod,maPrice,0);
double maFastH1 = iMA(NULL,PERIOD_H1,ma2Period,0,maMethod,maPrice,0);
double maSignalH1 = iMA(NULL,PERIOD_H1,ma3Period,0,maMethod,maPrice,0);
double stoH1 = iStochastic(NULL, PERIOD_H1, 7, 2, 2, MODE_LWMA, 1, MODE_MAIN, 0);
// .....
// H1 signals
if (ranging)
{
if (Bid < maSignalH1 && stoH1 < stoLow) doBox(h1StrongUp, high, leftSignalH1, low, rightSignalH1, 2);
else if (Bid > maSignalH1 && stoH1 > stoHigh) doBox(h1StrongDown, high, leftSignalH1, low, rightSignalH1, 2);
else doBox(CLR_NONE, high, leftSignalH1, low, rightSignalH1, 2);
}
else
{
if (Bid < maSignalH1 && Bid > maSlowH1 && Bid > maFastH1) doBox(h1StrongUp, high, leftSignalH1, low, rightSignalH1, 2);
else if (Bid > maSignalH1 && Bid < maSlowH1 && Bid < maFastH1) doBox(h1StrongDown, high, leftSignalH1, low, rightSignalH1, 2);
else doBox(CLR_NONE, high, leftSignalH1, low, rightSignalH1, 2);
}
so in your example we are not in a range so you get a H1 green bar when price is below H1-15ma and price above both H1-60ma & H1-240ma.
As I can only do 1 arrow per bar I use the closing price on the H1 bar.
Stoch only affects arrows when the price is Ranging (price between H4 60 & 240)
Hope that makes sense & I've interpreted it correctly!