Cheers
Old and defunct Holy Graily Bob
- rdg281
- Trader
- Posts: 56
- Joined: Mon Dec 09, 2013 10:39 pm
- Location: Netherlands Limburg
Holy Graily Bob
Cheers
Last edited by rdg281 on Wed Dec 10, 2014 10:39 am, edited 1 time in total.
The winner takes it all 
- oliverjp
- Trader
- Posts: 36
- Joined: Mon May 06, 2013 8:39 am
Holy Graily Bob
Hi Steve
Assuming suggested reason for immediate deletion of open orders is correct, I have slightly tweaked your ReadIndicatorValues() function to amend the logic so a wavy line detection is ignored if it occurs on the same candle as a Trend or Range signal. The wavy lines will still show on the chart because it is displaying from the indicator, but the EA will know to ignore the wavy lines and give preference to the Trend or Range signal.
Hope this allows you time for another cup of coffee in the morning. If not, please do chuck it away and code something more all encompassing
All the best
Jeff
Assuming suggested reason for immediate deletion of open orders is correct, I have slightly tweaked your ReadIndicatorValues() function to amend the logic so a wavy line detection is ignored if it occurs on the same candle as a Trend or Range signal. The wavy lines will still show on the chart because it is displaying from the indicator, but the EA will know to ignore the wavy lines and give preference to the Trend or Range signal.
Hope this allows you time for another cup of coffee in the morning. If not, please do chuck it away and code something more all encompassing
All the best
Jeff
Code: Select all
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void ReadIndicatorValues()
{
int cc = 0;
//Declare a shift for use with indicators.
int shift = 0;
if (!EveryTickMode)
{
shift = 1;
}//if (!EveryTickMode)
double val = 0;
//HGI
static datetime OldReadBarTime = 0;
if (EveryTickMode)
OldReadBarTime = 0;
//shift = 3;
if (OldReadBarTime != iTime(Symbol(), TradingTimeFrame, 0) )
{
OldReadBarTime = iTime(Symbol(), TradingTimeFrame, 0);
if (TimeCurrent() >= NextReadTime)
{
TrendArrowStatus = Trendnoarrow;
RangeArrowStatus = Rangenoarrow;
RadArrowStatus = Radnoarrow;
WaveStatus = Wavenone;
NextReadTime = TimeCurrent() + HgiReadDelaySeconds;
//Read the TMA component
TmaStatus = Tmanosignal;
//Buffer 7 holds a range end signal. Changed back to 0 because HGI displays the wavy line on the current candle
val = GetHGI(Symbol(), TradingTimeFrame, 7, 0);
if (!CloseEnough(val, EMPTY_VALUE) )
{
TmaStatus = Tmarangeendsignal;
RangeEndValue = val;
if (Bid < val)
WaveStatus = Wavesell;//High wavy line so sell below it
else
WaveStatus = Wavebuy;//Low wavy line so buy above it
}//if (!CloseEnough(val 0) )
else
{
//Buffer 6 holds a range signal.
val = GetHGI(Symbol(), TradingTimeFrame, 6, 0);
if (!CloseEnough(val, EMPTY_VALUE) )
{
TmaStatus = Tmarangesignal;
RangeStartValue = val;
if (Bid < val)
WaveStatus = Wavesell;//High wavy line so sell below it
else
WaveStatus = Wavebuy;//Low wavy line so buy above it
}//if (!CloseEnough(val 0) )
}//else
//Trend
//Buffer 0 contains a large grend trend up arrow
val = GetHGI(Symbol(), TradingTimeFrame, 0, shift);
if (!CloseEnough(val, EMPTY_VALUE) )
{
TrendArrowStatus = Trenduparrow;
WaveStatus = Wavenone;
}//if (!CloseEnough(val 0) )
else
{
//Buffer 1 holds large red down trend arrow
val = GetHGI(Symbol(), TradingTimeFrame, 1, shift);
if (!CloseEnough(val, EMPTY_VALUE) )
{
TrendArrowStatus = Trenddownarrow;
WaveStatus = Wavenone;
}//if (!CloseEnough(val 0) )
//Range arrows
else
{
//Buffer 3 holds small red down range arrow
val = GetHGI(Symbol(), TradingTimeFrame, 3, shift);
if (!CloseEnough(val, EMPTY_VALUE) )
{
RangeArrowStatus = Rangedownarrow;
WaveStatus = Wavenone;
}//if (!CloseEnough(val 0) )
else
{
//Buffer 2 holds small green up range arrow
val = GetHGI(Symbol(), TradingTimeFrame, 2, shift);
if (!CloseEnough(val, EMPTY_VALUE) )
{
RangeArrowStatus = Rangeuparrow;
WaveStatus = Wavenone;
}//if (!CloseEnough(val 0) )
//RAD arrows
else
{
//Buffer 4 holds green Rad arrows
val = GetHGI(Symbol(), TradingTimeFrame, 4, shift);
if (!CloseEnough(val, EMPTY_VALUE) )
{
RadArrowStatus = Raduparrow;
}//if (!CloseEnough(val 0) )
else
{
//Buffer 5 holds red Rad arrows
val = GetHGI(Symbol(), TradingTimeFrame, 5, shift);
if (!CloseEnough(val, EMPTY_VALUE) )
{
RadArrowStatus = Raddownarrow;
}//if (!CloseEnough(val 0) )
}//else
}//else
}//else
}//else
}//else
}
}//if (OldReadBarTime != iTime(Symbol(), TradingTimeFrame, 0) )
//MA
if(MaPeriod>0)
{
static datetime OldM1BarTime;
if(OldM1BarTime!=iTime(NULL,PERIOD_M1,0) && MaPeriod>0)
{
OldM1BarTime=iTime(NULL,PERIOD_M1,0);
//~ TradeLong = false;
//~ TradeShort = false;
MaVal=GetMa(Symbol(),MaTF,MaPeriod,MaShift,MaMethod,MaAppliedPrice,0);
if(Bid>MaVal)
{
MaTrend=up;
}//if (Bid > MaVal)
if(Bid<MaVal)
{
MaTrend=down;
}//if (Bid < MaVal)
}//if (OldM1BarTime != iTime(NULL, PERIOD_M1, 0))
}//if (MaPeriod > 0)
}//void ReadIndicatorValues()
//End Indicator module
////////////////////////////////////////////////////////////////////////////////////////
SteveHopwood » Tue Dec 09, 2014 9:55 pm wrote:Thanks. At last a post that doesn't merely say, "Errrrmmmm. It dunt wurk." I was beginning to despair of ever getting anything useful out of anyone other that the indi coders and Bob."]Hi Steve,
I hate to be a party-pooper.....
The newest version still has the rapid open/close 'bug'.
Reason is the EA 'sees' a buy-wave, AND prints an big SELL arrow, these conflict. The wave tells the EA to set buy pendings, the sell arrow deletes them immediately. And again, and again.
Yep. Defo something that needs sorting out. HGI was intended for manual traders who would sort out this kind of dichotomy for themselves.
Sadly, for an EA this means a major rewrite. Now, bear in mind this scenario. I have spent most of the day bug hunting. I am worn out. I am seriously pissed at some dimwits here and am about to go dimwit hunting. Dinner tonight included a couple of glasses of wine and a small whiskey. Said small whiskey is about to be followed by quite a large one. Those of us who drink alcohol understand how doing so lifts inhibitions, so the large one might be followed by another large one.
I might not remember this in the morning is what I am saying here. So, would you please send me a link to your post at a human time in the morning to remind me about it, please.
Ok, off to impose some discipline elsewhere. Offer up prayers for the dimwits, guys. They will be wasted, but try on their behalves.
- TheWolfInsideUs
- Trader
- Posts: 12
- Joined: Mon Oct 27, 2014 1:59 pm
Holy Graily Bob
Hi everyone,
Steve and the people you work with; you have a new fan! The speed at which you work is admirable. When will you go on a well deserved vacation?
Here is a little update on my progress with the EA. I should mention that I still use version 1J of the EA, because in my opinion the added features like the ADR closure are additional. (I will update to the latest version of the EA at a later time). From Friday to Monday night the EA made over 19% ROI on a 15 minute timeframe with a max DD of 5.1%. However it gave, after a great start today, approximately 13% back to the market. And what struck me is that the EA is even on a day like this very often correct with positioning it's trades, which is fantastic!
I do not know if we are already ready for this phase in the progress. But I would like to make a suggestion for profitability security. I'm pretty new on the website, but if I can remember well you are using some sort of a basket closure system for some of your EA's. After the experience of today, among other things, it might be a good idea to close all the open trades and pending orders when a certain profit expressed as a percentage is gained. And after this process you just let the beast (EA) get back to work.
Thanks for your time.
Enjoy your whiskey and maybe one day I can send you a bottle of Macallan 1939 because of the effort of guys like you.
My sincere respect,
The Wolf.
Steve and the people you work with; you have a new fan! The speed at which you work is admirable. When will you go on a well deserved vacation?
Here is a little update on my progress with the EA. I should mention that I still use version 1J of the EA, because in my opinion the added features like the ADR closure are additional. (I will update to the latest version of the EA at a later time). From Friday to Monday night the EA made over 19% ROI on a 15 minute timeframe with a max DD of 5.1%. However it gave, after a great start today, approximately 13% back to the market. And what struck me is that the EA is even on a day like this very often correct with positioning it's trades, which is fantastic!
I do not know if we are already ready for this phase in the progress. But I would like to make a suggestion for profitability security. I'm pretty new on the website, but if I can remember well you are using some sort of a basket closure system for some of your EA's. After the experience of today, among other things, it might be a good idea to close all the open trades and pending orders when a certain profit expressed as a percentage is gained. And after this process you just let the beast (EA) get back to work.
Thanks for your time.
Enjoy your whiskey and maybe one day I can send you a bottle of Macallan 1939 because of the effort of guys like you.
My sincere respect,
The Wolf.
-
batemap
- Trader
- Posts: 20
- Joined: Tue Nov 15, 2011 9:17 pm
- Location: Melbourne, Australia
Holy Graily Bob
Hi WolfTheWolfInsideUs » Wed Dec 10, 2014 1:26 pm wrote:Hi everyone,
I do not know if we are already ready for this phase in the progress. But I would like to make a suggestion for profitability security. I'm pretty new on the website, but if I can remember well you are using some sort of a basket closure system for some of your EA's. After the experience of today, among other things, it might be a good idea to close all the open trades and pending orders when a certain profit expressed as a percentage is gained. And after this process you just let the beast (EA) get back to work.
The Wolf.
Look into Steve's (or others) trade managers (http://www.stevehopwoodforex.com/phpBB3 ... ?f=21&t=64).
-
taipan
- Trader
- Posts: 355
- Joined: Sat Feb 16, 2013 11:27 am
Holy Graily Bob
batemap » Wed Dec 10, 2014 11:17 am wrote:Hi WolfTheWolfInsideUs » Wed Dec 10, 2014 1:26 pm wrote:Hi everyone,
I do not know if we are already ready for this phase in the progress. But I would like to make a suggestion for profitability security. I'm pretty new on the website, but if I can remember well you are using some sort of a basket closure system for some of your EA's. After the experience of today, among other things, it might be a good idea to close all the open trades and pending orders when a certain profit expressed as a percentage is gained. And after this process you just let the beast (EA) get back to work.
The Wolf.
Look into Steve's (or others) trade managers (http://www.stevehopwoodforex.com/phpBB3 ... ?f=21&t=64).
Also, see milanese "an other AllPairTradeManager" thread (http://www.stevehopwoodforex.com/phpBB3 ... =21&t=3482
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Holy Graily Bob
Millions of thanks Jeff. Hugely appreciated.oliverjp » Wed Dec 10, 2014 2:21 am wrote:Hi Steve
Assuming suggested reason for immediate deletion of open orders is correct, I have slightly tweaked your ReadIndicatorValues() function to amend the logic so a wavy line detection is ignored if it occurs on the same candle as a Trend or Range signal. The wavy lines will still show on the chart because it is displaying from the indicator, but the EA will know to ignore the wavy lines and give preference to the Trend or Range signal.
Hope this allows you time for another cup of coffee in the morning. If not, please do chuck it away and code something more all encompassing![]()
All the best
Jeff
V 1t with Jeff's fix is in post 1 folks. It is an essential download if you cannot copy it for yourselves.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Holy Graily Bob
I think most of us are seeing this. Imagine being new here and starting HGB at the top end of the retrace.rdg281 » Tue Dec 09, 2014 9:59 pm wrote:
This pattern happened since we started. First plus than minus, plus, minus etc
So case is when to take the profit and when restarting again.
I think that will be the game. Almost like the manual strategy of Bob![]()
Wolf, I am going to adopt your idea of shutting up shop for the day once a certain percentage of profit is hit; this will be a user input.
So, StopTradingAtProfitPercent = ?
Please post your suggestions for the default value.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
-
burmanfx
- Trader
- Posts: 12
- Joined: Sun Oct 05, 2014 2:53 am
Holy Graily Bob
What about a percentage based, basket jumping stop? So once 10% is achieved jump overall stop to 5%, 10%, 15% profit etc. Keep up the great work Steve! Lot's of pips, now just need to hold on to them!
-
burmanfx
- Trader
- Posts: 12
- Joined: Sun Oct 05, 2014 2:53 am
Holy Graily Bob
Another possible feature could be to kill all trades not in profit after x hours. weeding out bad trades, keeping the winners.
- Gertje
- Trader
- Posts: 1936
- Joined: Mon Dec 12, 2011 1:17 pm
- Location: Middle of the Netherlands
Holy Graily Bob
5% would be nice.SteveHopwood » Wed Dec 10, 2014 9:58 am wrote: I think most of us are seeing this. Imagine being new here and starting HGB at the top end of the retrace.![]()
Wolf, I am going to adopt your idea of shutting up shop for the day once a certain percentage of profit is hit; this will be a user input.
So, StopTradingAtProfitPercent = ?
Please post your suggestions for the default value.
I would suggest to also make a $-value entry, since the amount of UP is depending on the lotsize rather that the accountsize.
I trade 0.01x$1.000,- so 5% would be $50,- to start. After a while, when balance is $1.900,- the same size trades would have to chuck in $95,- to be closed by this feature.
V1s rocks, now upload the newer version.