stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Holy Graily Candle Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5517
Page 3 of 5
Author:  tomele [ Sun Sep 09, 2018 10:34 pm ]
Post subject:  Holy Graily Candle Bob

trader689 » 09 Sep 2018, 23:28 wrote:thanks Tomele. I did have the libsssr files (include and library) but I didn't have the Tdesk files. I have now added the Tdesk files to the correct directories but still the same errors. note: since Steve's post suggesting that the EA may not be compatible with the latest libsssr files I have been attempting with the older ones from post 1 of this thread.

trader
Strange. It works perfect here when everything is in place. Please show me the compile log.
Author:  trader689 [ Sun Sep 09, 2018 11:04 pm ]
Post subject:  Holy Graily Candle Bob

Woops. Seems I had changed the name of the EA slightly to differentiate between the one from the first post and the one from Mat's post after getting the initial errors. Now i have just changed it back to plain Holy Graily Candle Bob (and now also, importantly with the Tdesk files) it is compiling fine.

thanks Tomele and Steve,

trader

tomele » Sun Sep 09, 2018 10:34 pm wrote:
trader689 » 09 Sep 2018, 23:28 wrote:thanks Tomele. I did have the libsssr files (include and library) but I didn't have the Tdesk files. I have now added the Tdesk files to the correct directories but still the same errors. note: since Steve's post suggesting that the EA may not be compatible with the latest libsssr files I have been attempting with the older ones from post 1 of this thread.

trader
Strange. It works perfect here when everything is in place. Please show me the compile log.
Author:  SteveHopwood [ Sun Sep 09, 2018 11:30 pm ]
Post subject:  Holy Graily Candle Bob

trader689 » Sun Sep 09, 2018 11:04 pm wrote:Woops. Seems I had changed the name of the EA slightly to differentiate between the one from the first post and the one from Mat's post after getting the initial errors. Now i have just changed it back to plain Holy Graily Candle Bob (and now also, importantly with the Tdesk files) it is compiling fine.

thanks Tomele and Steve,

trader
I have deleted Mat's post.

Best to only have one version of an EA per thread.

Do feel free to start threads with different versions elsewhere.

:xm: :rocket:
Author:  slipshod [ Sun Sep 09, 2018 11:33 pm ]
Post subject:  Holy Graily Candle Bob

Regarding LibSSSR, the new version is called LibSSSRv5 for both the library and the header. Hence if/when it's included in this EA, the reference to the include file in the EA's code will need to be changed to the new name. That's the only change which should be required. At the moment the first post on this thread (which I assume is kept up to date with the latest EA version?) has downloads for LibSSSRv4.

Edit: On my own demo platform I've made that adjustment and compiled it with v5 of the library, and there doesn't seem to be any problem. I'll note when it starts taking trades & check to ensure it's working as it should in relation to S/R zones.

Edit #2: I'm trialling a variant of the S/R logic. I've created a boolean in the EA called OpenSomeTradesInsideSRZones, and have implemented the logic as follows (starting at line 690):-

Code: Select all

      if (DontOpenTradesInsideSRZones || OpenSomeTradesInsideSRZones)
         
         text = "Trades will not be opened inside support or resistance zones";
         if (AllSignals == up)
            if (Bid <= NormalizeDouble(res_hi, Digits) && Bid >= NormalizeDouble(res_lo, Digits))
               text = "Bid price inside resistance zone. Buys won't be opened";
            else if (!OpenSomeTradesInsideSRZones && Bid <= NormalizeDouble(sup_hi, Digits) && Bid >= NormalizeDouble(sup_lo, Digits))
                    text = "Bid price inside support zone. Buys won't be opened";
         if (AllSignals == down)
            if (!OpenSomeTradesInsideSRZones && Ask <= NormalizeDouble(res_hi, Digits) && Ask >= NormalizeDouble(res_lo, Digits)) 
               text = "Ask price inside resistance zone. Sells won't be opened";
            else if (Ask <= NormalizeDouble(sup_hi, Digits) && Ask >= NormalizeDouble(sup_lo, Digits))
                    text = "Ask price inside support zone. Sells won't be opened";
         SM(text + NL);
         SM(NL);
      }//if(UseSuppRes)
The idea is that a buy can be implemented within a support zone, but not with resistance. Vice versa for sells. This differs from "DontOpenTradesInsideSRZones" which avoids trades regardless of the direction & type of zone. If this works well, I guess another variant could restrict buys to only when the price is in (or near) support, and vice versa for sells.
Author:  SteveHopwood [ Mon Sep 10, 2018 3:42 pm ]
Post subject:  Gormless bloop alert

I could see that there should have been trades today, thanks to the wonderful TDesk. Nothing has happened so I went bug hunting and found the offender straight away. The fix is in 1e in post 1.

The simple DIY fix can be found by doing a search for "bool InsideZone = true;" and replace it with:
bool InsideZone = false;

You will see why this stopped trading if you then do a search for "InsideZone". This will take you to the block of code that cancels trades if the market is inside a zone.

:arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg:


:xm: :rocket:
Author:  SteveHopwood [ Mon Sep 10, 2018 3:45 pm ]
Post subject:  Holy Graily Candle Bob

Hold back on updating folks. I have just ween Andrew's latest post so I need to update the library.

:xm: :rocket:
Author:  SteveHopwood [ Mon Sep 10, 2018 4:00 pm ]
Post subject:  Holy Graily Candle Bob

The correct Include and Libraries files are in post 1 now. HGCB is pointed to the correct ones in V 1f.

Do a search for "#include <LibSSSRv4.mqh>" if you want to make the change yourself, and replace it with
#include <LibSSSRv5.mqh>

Thanks Andrew.

:xm: :rocket:
Author:  SteveHopwood [ Mon Sep 10, 2018 4:01 pm ]
Post subject:  Holy Graily Candle Bob

The gormless bloop I described a few posts ago was the cause of non-trading. I have the appropriate trades now.

:xm: :rocket:
Author:  SteveHopwood [ Mon Sep 10, 2018 5:38 pm ]
Post subject:  Holy Graily Candle Bob

V 1h is in post 1, in response to this from Andrew's thread:
slipshod » Sun Sep 09, 2018 11:33 pm wrote: Edit #2: I'm trialling a variant of the S/R logic. I've created a boolean in the EA called OpenSomeTradesInsideSRZones, and have implemented the logic as follows (starting at line 690):-

The idea is that a buy can be implemented within a support zone, but not with resistance. Vice versa for sells. This differs from "DontOpenTradesInsideSRZones" which avoids trades regardless of the direction & type of zone. If this works well, I guess another variant could restrict buys to only when the price is in (or near) support, and vice versa for sells.
This sounds like a good idea to me, so I have implemented it. There is a new input, OpenSomeTradesInsideSRZones. This allows buys from within a support zone and sells from within resistance.

I have added some alerts to show when the bot has closed trades at an S/R take profit and stop loss following entry to the relevant zone.

There may be bugs.

:xm: :rocket:
Author:  SteveHopwood [ Tue Sep 11, 2018 12:04 am ]
Post subject:  Holy Graily Candle Bob

Here is one for us to think about folks. Not a hint of resistance in sight.
EURNZDH1.png
Using the next resistance as a TP will fail here. The next resistance is on the D1.

Support will act as a trailing stop. Or we can close manually, but then the bot will simply open new trades if the market continues to rise. No reason why it shouldn't - cycles within cycles within cycles etc.

Stuff to think about.

Any ideas folks? Here are the ones I am contemplating:
  • Move up the time frames to find the next resistance as the TP.
  • Do not trade long when there is no resistance, or short when there is no support. Or just yell, "Wheyhay. Nothing in my way for a bloody change" and go for it big time.
I favour no 2.

:xm: :rocket:
All times are UTC Page 3 of 5