Specification
I need someone to create for me 1st a Divergence Indicator that will run on a Median Renko chart.
As illustrated on the images included, which is basically very clear.
Whenever we have an Even or Lower new Down-Red bar closed with a Higher number of the Main Stochastics, we wait for the 1st Green reversal bar closed, then a bottom Divergence is valid ! and lines should be drawn of the Divergence on the Bars and on the Main Stochastics, and an Up arrow should be printed below the Green reversal bar.
And of course the same for Top Divergence - Down signals, Whenever we have an Even or Lower new Up-Green bar closed with a Lower number of the Main Stochastics, we wait for the 1st reversal Red bar closed, then a top Divergence is valid ! and lines should be drawn of the Divergence on the Bars and on the Main Stochastics, and an Down arrow should be printed above the Green reversal bar.
I will also need an option to choose if I want these signals to be drawn only in accordance with trend based on a fast EMA crossed above or below a Slow EMA.
Once the indicator will be Done and inspected, I will need this Indicator to be integrated into my current EA as an entry signals for the EA to open trades whenever such a Divergence signal shows up.
I'm including the instructions from the Renko chart developer, the information needed for how to setup an Indicator and EA to work on these Renko Charts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*) EAs can be used directly on the offline chart however a small tweak is required, so you need to have access to your EA source code. Below is an EA skeleton example that is capable of running directly on the offline chart:
#property strict //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { // You need to initialize a time to call the OnTimer event. // It is used to call OnTick whenever the Bid price changes. // The check is made every 250 ms, which should be sufficient. EventSetMillisecondTimer(250); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { // Remember to destroy timer in the OnDeinit event. EventKillTimer(); //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { // // This is where all of your EA trading logic resides. // I just write to the log in this example... // Print("OnTick function call - bid = "+(string)Bid); } //+------------------------------------------------------------------+ //| The OnTimer function is used to call OnTick() | //| whenever the Bid price changes. | //+------------------------------------------------------------------+ void OnTimer() { RefreshRates(); static double prevBid = 0; if(Bid != prevBid) { prevBid = Bid; OnTick(); } } //+------------------------------------------------------------------+