|
coders to convert this to MQ4
// Brian Intra-day idea.
//
// 3 Nov 06.
// This is just a draft based on my understanding of Brian idea...
// Not sure if this is what he mean exactly, need to verify.
//SetChartBkGradientFill( ParamColor("BgTop", colorWhite),ParamColor("BgBottom", colorLightYellow),ParamColor("title block",colorWhite));
Displacement = Param("Displacement", 1, 0, 1 );
Diff_prd1 = 5;
Diff_prd2 = 7;
Diff_prd3 = 22;
Diff_prd4 = 80;
Diff_HL= H - L;
Diff_HL_MA1= MA(Diff_HL,Diff_prd1);
Diff_HL_MA2= MA(Diff_HL,Diff_prd2);
Diff_HL_MA3= MA(Diff_HL,Diff_prd3);
Diff_HL_MA4= MA(Diff_HL,Diff_prd4);
Plot( Diff_HL, _DEFAULT_NAME(), ParamColor("Color", ColorCycle), ParamStyle("Histogram style", styleHistogram | styleNoLabel|4, maskHistogram ));
Plot( Diff_HL_MA1, "MA5", colorGreen, styleLine, 0, 0, Displacement );
Plot( Diff_HL_MA2, "MA7", colorBlue, styleLine, 0, 0, Displacement );
Plot( Diff_HL_MA3, "MA22", colorRed, styleLine, 0, 0, Displacement );
Plot( Diff_HL_MA4, "MA80", colorGold, styleLine, 0, 0, Displacement );
//Working out the Possible Price Range...(This is Dynamic)
//1) For the Caculated Today Possible High with Respect to Today Low...
//2) For the Caculated Today Possible Low with Respect to Today Low...
DynHigh1 = L + Ref(Diff_HL_MA1,-1);
DynLow1 = H - Ref(Diff_HL_MA1,-1);
DynHigh2 = L + Ref(Diff_HL_MA2,-1);
DynLow2 = H - Ref(Diff_HL_MA2,-1);
DynHigh3 = L + Ref(Diff_HL_MA3,-1);
DynLow3 = H - Ref(Diff_HL_MA3,-1);
printf("Today Dynamic High (7 Day MA) is: %g\n",DynHigh1);
printf("Today Dynamic Low (7 Day MA) is: %g\n",DynLow1);
printf("\n");
printf("Today Dynamic High (22 Day MA) is: %g\n",DynHigh2);
printf("Today Dynamic Low (22 Day MA) is: %g\n",DynLow2);
printf("\n");
printf("Today Dynamic High (50 Day MA) is: %g\n",DynHigh3);
printf("Today Dynamic Low (50 Day MA) is: %g\n",DynLow3);
printf("\n\n");
_SECTION_END();
|