jiva34's BB Stop auto-trader
-
SWG123
- Trader
- Posts: 565
- Joined: Wed Nov 16, 2011 3:02 pm
- Location: Cape Town
Re: jiva34's BB Stop auto-trader
Another great start for jiva, +58 on EU M5.
You do not have the required permissions to view the files attached to this post.
-
Xfinity
- Trader
- Posts: 19
- Joined: Thu Nov 17, 2011 4:43 pm
- Location: Sweden
Re: jiva34's BB Stop auto-trader
Thanks!bobasker wrote:Sure, no problem
-
Kimmy
- Trader
- Posts: 32
- Joined: Thu Nov 17, 2011 10:57 am
Re: jiva34's BB Stop auto-trader
A miserable day for the 1min TF just had my first win after a whole day of losses in this horrible day of chop since the London open,
16 losses and 1 win !!!!
How can we try to cut down on losses when we have days like today ?
16 losses and 1 win !!!!
How can we try to cut down on losses when we have days like today ?
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: jiva34's BB Stop auto-trader
There's a small error reporting issue in this bot, and perhaps others where it reports an error(0) no error when it is opening an order on an ECN AND the Sl and TP are set to 0. The procedure is:
I have added the line
at the top to handle the case when there is no TP and no SL specified for the order. The remainder of the code handled the other cases, but reported an error if the code made it to the end of the loop.
Just to be clear, there isn't a problem with order entry, it's just reporting that there isn't one. :>
EDIT: Feel free to make this change on your own, or wait till it gets rolled into some more important change.
George
Code: Select all
void ModifyOrder(int ticket, double stop, double take)
{
//Modifies an order already sent if the crim is ECN.
if (!OrderSelect(ticket, SELECT_BY_TICKET) ) return;//Trade does not exist, so no mod needed
if (stop == 0 && take == 0) return; //nothing to do
//RetryCount is declared as 10 in the Trading variables section at the top of this file
for (int cc = 0; cc < RetryCount; cc++)
{
for (int d = 0; (d < RetryCount) && IsTradeContextBusy(); d++) Sleep(100);
if (take > 0 && stop > 0)
{
while(IsTradeContextBusy()) Sleep(100);
if (OrderModify(ticket, OrderOpenPrice(), stop, take, OrderExpiration(), CLR_NONE)) return;
}//if (take > 0 && stop > 0)
if (take != 0 && stop == 0)
{
while(IsTradeContextBusy()) Sleep(100);
if (OrderModify(ticket, OrderOpenPrice(), OrderStopLoss(), take, OrderExpiration(), CLR_NONE)) return;
}//if (take == 0 && stop != 0)
if (take == 0 && stop != 0)
{
while(IsTradeContextBusy()) Sleep(100);
if (OrderModify(ticket, OrderOpenPrice(), stop, OrderTakeProfit(), OrderExpiration(), CLR_NONE)) return;
}//if (take == 0 && stop != 0)
}//for (int cc = 0; cc < RetryCount; cc++)
//Got this far, so the order modify failed
int err=GetLastError();
Print(Symbol(), " SL/TP order modify failed with error(",err,"): ",ErrorDescription(err));
Alert(Symbol(), " SL/TP order modify failed with error(",err,"): ",ErrorDescription(err));
}//void ModifyOrder(int ticket, double tp, double sl)
Code: Select all
if (stop == 0 && take == 0) return; //nothing to doJust to be clear, there isn't a problem with order entry, it's just reporting that there isn't one. :>
EDIT: Feel free to make this change on your own, or wait till it gets rolled into some more important change.
George
-
SWG123
- Trader
- Posts: 565
- Joined: Wed Nov 16, 2011 3:02 pm
- Location: Cape Town
Re: jiva34's BB Stop auto-trader
Try using ATR as a volatility filter. I do and it helps to keep me out of trading during wishy-washy market conditions. Stick it on today's chart and look back. For EU M1, 4 pips is a typical average level.Kimmy wrote:A miserable day for the 1min TF just had my first win after a whole day of losses in this horrible day of chop since the London open,
16 losses and 1 win !!!!
How can we try to cut down on losses when we have days like today ?
See how today's trading would have looked if you had kept out of the market when ATR was above 4 pips (i.e. 0.0004 in the indi)?
BTW, ATR default period is 14 - I like to use 8 - it's up to you but please experiment.
- bobasker
- Trader
- Posts: 60
- Joined: Tue Nov 15, 2011 10:12 pm
- Location: I come from the land Downunder...
- bobasker
- Trader
- Posts: 60
- Joined: Tue Nov 15, 2011 10:12 pm
- Location: I come from the land Downunder...
Re: jiva34's BB Stop auto-trader
Kimmy wrote:A miserable day for the 1min TF just had my first win after a whole day of losses in this horrible day of chop since the London open,
16 losses and 1 win !!!!
How can we try to cut down on losses when we have days like today ?
Trade a higher time frame, you will catch more pips with less chop and unnecessary exposure.
-
SWG123
- Trader
- Posts: 565
- Joined: Wed Nov 16, 2011 3:02 pm
- Location: Cape Town
Re: jiva34's BB Stop auto-trader
Bob knows his stuff and I sort of agree with him, but there are some days when market swings will hurt you badly on the higher TFs too.bobasker wrote:Kimmy wrote:A miserable day for the 1min TF just had my first win after a whole day of losses in this horrible day of chop since the London open,
16 losses and 1 win !!!!
How can we try to cut down on losses when we have days like today ?
Trade a higher time frame, you will catch more pips with less chop and unnecessary exposure.
If you want to trade shorter TFs my personal mantra, which would have helped a lot today, is don't trade when price is stuck between daily open and pivot. Today it ranged there before breaking short around London open, bouncing off S1/yesterday's low, faffed around for ages, climbed back to the daily pivot and drifted down again. Plenty of pips to be made in the right direction.
-
musky
- Trader
- Posts: 54
- Joined: Fri Nov 18, 2011 8:30 pm
- Location: Northwoods
Re: jiva34's BB Stop auto-trader
Yes i can confirm forward in forward testing this does not like the 1 min time frame.
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Re: jiva34's BB Stop auto-trader
George, I missed this when you posted it. I see it now and have added this to jive, although not posted, and to the generic, also not posted. There is time to add everything, eventually.gaheitman wrote:There's a small error reporting issue in this bot, and perhaps others where it reports an error(0) no error when it is opening an order on an ECN AND the Sl and TP are set to 0. The procedure is:
I have added the lineCode: Select all
void ModifyOrder(int ticket, double stop, double take) { //Modifies an order already sent if the crim is ECN. if (!OrderSelect(ticket, SELECT_BY_TICKET) ) return;//Trade does not exist, so no mod needed if (stop == 0 && take == 0) return; //nothing to do //RetryCount is declared as 10 in the Trading variables section at the top of this file for (int cc = 0; cc < RetryCount; cc++) { for (int d = 0; (d < RetryCount) && IsTradeContextBusy(); d++) Sleep(100); if (take > 0 && stop > 0) { while(IsTradeContextBusy()) Sleep(100); if (OrderModify(ticket, OrderOpenPrice(), stop, take, OrderExpiration(), CLR_NONE)) return; }//if (take > 0 && stop > 0) if (take != 0 && stop == 0) { while(IsTradeContextBusy()) Sleep(100); if (OrderModify(ticket, OrderOpenPrice(), OrderStopLoss(), take, OrderExpiration(), CLR_NONE)) return; }//if (take == 0 && stop != 0) if (take == 0 && stop != 0) { while(IsTradeContextBusy()) Sleep(100); if (OrderModify(ticket, OrderOpenPrice(), stop, OrderTakeProfit(), OrderExpiration(), CLR_NONE)) return; }//if (take == 0 && stop != 0) }//for (int cc = 0; cc < RetryCount; cc++) //Got this far, so the order modify failed int err=GetLastError(); Print(Symbol(), " SL/TP order modify failed with error(",err,"): ",ErrorDescription(err)); Alert(Symbol(), " SL/TP order modify failed with error(",err,"): ",ErrorDescription(err)); }//void ModifyOrder(int ticket, double tp, double sl)
at the top to handle the case when there is no TP and no SL specified for the order. The remainder of the code handled the other cases, but reported an error if the code made it to the end of the loop.Code: Select all
if (stop == 0 && take == 0) return; //nothing to do
Just to be clear, there isn't a problem with order entry, it's just reporting that there isn't one. :>
EDIT: Feel free to make this change on your own, or wait till it gets rolled into some more important change.
George
Cheers
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.