Indicator vs manual selection, the difference between human eye and digital and the solution to it?
Dear all FF users, i do have an interesting problem. In my exploring for my trading strategy it did seems to me handy if i did assemble a indicator to the rules as my manual checklist to find entry's. In my opinion if you have an indi who do the work for u, u check much more easily the time frames on entry's but also different pairs u can screen much quicker. But the indi does not give the same results, as when the manual check is done.
My question is how can it be solved?
So i have to following to offer, the selection rules, screen photo's, the indicator as text, and as program.
The Rules for selection on entry long or short.
The channel:
High channel setting 5 smooth MA set to the high (on the chart yellow line)
Low channel setting 5 smooth MA set to the low (on the chart yellow line)
Order is instant when condition is complete:
Long condition:
Sign is arrow up
Candle 2 open is below the low channel
Candle 2 close is above the open
Candle 1 open is above the low channel <---- corrected at 25-07-2016
Candle 1 close is above the open
Short condition:
Sign is arrow down
Candle 2 open is above the high channel
Candle 2 close is below the open
Candle 1 close below the high channel
Candle 1 close is below the open
Screen print manual arrows selection by the rules.
Screen print manual arrows changed for lines
Screen print lines vs de indicator results Okay is green thumbs up bad selection is red thumbs and a question mark is doubting between okay or not.
By the way the manual selection shows the arrows on the candle 1 and the indi put the next to candle one after the closing. No big deal but just for notice.
At 27-07-2016 i did put the corrected code below in the code quote!
27-07-2016 i did replace the corrected indi.
The indi.
Kind regards Musickfreak
Dear all FF users, i do have an interesting problem. In my exploring for my trading strategy it did seems to me handy if i did assemble a indicator to the rules as my manual checklist to find entry's. In my opinion if you have an indi who do the work for u, u check much more easily the time frames on entry's but also different pairs u can screen much quicker. But the indi does not give the same results, as when the manual check is done.
My question is how can it be solved?
So i have to following to offer, the selection rules, screen photo's, the indicator as text, and as program.
The Rules for selection on entry long or short.
The channel:
High channel setting 5 smooth MA set to the high (on the chart yellow line)
Low channel setting 5 smooth MA set to the low (on the chart yellow line)
Order is instant when condition is complete:
Long condition:
Sign is arrow up
Candle 2 open is below the low channel
Candle 2 close is above the open
Candle 1 open is above the low channel <---- corrected at 25-07-2016
Candle 1 close is above the open
Short condition:
Sign is arrow down
Candle 2 open is above the high channel
Candle 2 close is below the open
Candle 1 close below the high channel
Candle 1 close is below the open
Screen print manual arrows selection by the rules.
Screen print manual arrows changed for lines
Screen print lines vs de indicator results Okay is green thumbs up bad selection is red thumbs and a question mark is doubting between okay or not.
By the way the manual selection shows the arrows on the candle 1 and the indi put the next to candle one after the closing. No big deal but just for notice.
At 27-07-2016 i did put the corrected code below in the code quote!
Inserted Code
//+------------------------------------------------------------------+ //| Indicator: sma entry test indi.mq4 | //| Created with EABuilder.com | //| http://eabuilder.com | //+------------------------------------------------------------------+ #property copyright "Created with EABuilder.com" #property link "http://eabuilder.com" #property version "1.00" #property description "Test indicator to see where the sma entry\'s could b ." #property description "Just drop it on the chart and see." #include <stdlib.mqh> #include <stderror.mqh> //--- indicator settings #property indicator_chart_window #property indicator_buffers 2 #property indicator_type1 DRAW_ARROW #property indicator_width1 5 #property indicator_color1 0xFFAA00 #property indicator_label1 "Buy" #property indicator_type2 DRAW_ARROW #property indicator_width2 5 #property indicator_color2 0x0000FF #property indicator_label2 "Sell" //--- indicator buffers double Buffer1[]; double Buffer2[]; extern double CSR_Min = 20; extern double CSR_Max = 300; extern int Low_band = 5; extern int High_band = 5; double myPoint; //initialized in OnInit void myAlert(string type, string message) { if(type == "print") Print(message); else if(type == "error") { Print(type+" | sma entry test indi @ "+Symbol()+","+Period()+" | "+message); } else if(type == "order") { } else if(type == "modify") { } } //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { IndicatorBuffers(2); SetIndexBuffer(0, Buffer1); SetIndexEmptyValue(0, 0); SetIndexArrow(0, 241); SetIndexBuffer(1, Buffer2); SetIndexEmptyValue(1, 0); SetIndexArrow(1, 242); //initialize myPoint myPoint = Point(); if(Digits() == 5 || Digits() == 3) { myPoint *= 10; } return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ 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); ArraySetAsSeries(Buffer2, true); //--- initial zero if(prev_calculated < 1) { ArrayInitialize(Buffer1, 0); ArrayInitialize(Buffer2, 0); } 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(Open[2+i] < iMA(NULL, PERIOD_CURRENT, Low_band, 0, MODE_SMMA, PRICE_LOW, 2+i) //Candlestick Open < Moving Average && Close[1+i] > Open[1+i] //Candlestick Close > Candlestick Open && Close[1+i] > iMA(NULL, PERIOD_CURRENT, Low_band, 0, MODE_SMMA, PRICE_LOW, 1+i) //Candlestick Close > Moving Average && Close[2+i] > Open[2+i] //Candlestick Close > Candlestick Open && (High[1+i] - Low[1+i]) > CSR_Min * myPoint //Candlestick Range > fixed value && (High[1+i] - Low[1+i]) < CSR_Max * myPoint //Candlestick Range < fixed value ) { Buffer1[i] = Low[1+i] - iATR(NULL, PERIOD_CURRENT, 14, i); //Set indicator value at Candlestick Low - Average True Range } else { Buffer1[i] = 0; } //Indicator Buffer 2 if(Open[2+i] > iMA(NULL, PERIOD_CURRENT, High_band, 0, MODE_SMMA, PRICE_HIGH, 2+i) //Candlestick Open > Moving Average && Close[2+i] < Open[2+i] //Candlestick Close < Candlestick Open && Close[1+i] < iMA(NULL, PERIOD_CURRENT, High_band, 0, MODE_SMMA, PRICE_HIGH, 1+i) //Candlestick Close < Moving Average && Close[1+i] < Open[1+i] //Candlestick Close < Candlestick Open && (High[1+i] - Low[1+i]) > CSR_Min * myPoint //Candlestick Range > fixed value && (High[1+i] - Low[1+i]) < CSR_Max * myPoint //Candlestick Range < fixed value ) { Buffer2[i] = High[1+i] + iATR(NULL, PERIOD_CURRENT, 14, i); //Set indicator value at Candlestick High + Average True Range } else { Buffer2[i] = 0; } } return(rates_total); } //+------------------------------------------------------------------+
27-07-2016 i did replace the corrected indi.
The indi.
Attached File(s)
sma entry test indi(2).mq4
5 KB
|
270 downloads
|
Uploaded Jul 27, 2016 7:17am
Kind regards Musickfreak
"The only difference between men and boys is the price of their toys". :-)