ShelleyJem. Fantastic collision of accident and analysis
-
fxshadow
- Trader
- Posts: 61
- Joined: Tue Nov 15, 2011 11:46 pm
Re: ShelleyJem. Fantastic collision of accident and analysis
Getting this error on SJ 1h.
2012.06.12 08:38:52 ShelleyJem GBPJPYm,Daily: invalid double number as parameter 2 for GlobalVariableSet function
2012.06.12 08:38:52 ShelleyJem GBPJPYm,Daily: invalid double number as parameter 2 for GlobalVariableSet function
- 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: ShelleyJem. Fantastic collision of accident and analysis
Here is one I coded for Jem. He wants a basket trader that sends a mixed basket of buys/sells as soon as he loads up the ea- all other take profit etc stuff left in place. The Buy/Sell pair input defaults are not suggestions; something has to be the default or there is no trade.
The problem with a bot that trades the instant you load it up is that it will trade again the instant the basket closes. To overcome this, I have included the 'safety feature' common to my Waiting to Trade EA's. If you need to restart your platform with a basket open, denying sending the trades still allows Snow to monitor the basket.
You will see that I have cleaned up the pips/points thingy. The code is courtesy of Lifesys (Paul), and now I see what Gary was getting at. Paul used Janet and John words in the Big Print version, so I got it.
Over the next couple of days, I will port this across to all the other Shelley variants.
Jem will tell you what he intends doing with this, but to quote a little from one of his pm's; "I'm hell bent on making 10.2 work as a basket system. Watching 400 pips rack up in an hour is addictive! It also saves from worrying about where to put stops and limits and saves from hours in front of the charts because all we wait for is for the ducks to line up and then ka-blimey."
Sounds like A Plan to me.

The problem with a bot that trades the instant you load it up is that it will trade again the instant the basket closes. To overcome this, I have included the 'safety feature' common to my Waiting to Trade EA's. If you need to restart your platform with a basket open, denying sending the trades still allows Snow to monitor the basket.
You will see that I have cleaned up the pips/points thingy. The code is courtesy of Lifesys (Paul), and now I see what Gary was getting at. Paul used Janet and John words in the Big Print version, so I got it.
Jem will tell you what he intends doing with this, but to quote a little from one of his pm's; "I'm hell bent on making 10.2 work as a basket system. Watching 400 pips rack up in an hour is addictive! It also saves from worrying about where to put stops and limits and saves from hours in front of the charts because all we wait for is for the ducks to line up and then ka-blimey."
Sounds like A Plan to me.
You do not have the required permissions to view the files attached to this post.
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.
-
phil_trade
Re: ShelleyJem. Fantastic collision of accident and analysis
Great Steve... I'm Happy you don't use anymoreSteveHopwood wrote:Here is one I coded for Jem. He wants a basket trader that sends a mixed basket of buys/sells as soon as he loads up the ea- all other take profit etc stuff left in place. The Buy/Sell pair input defaults are not suggestions; something has to be the default or there is no trade.
The problem with a bot that trades the instant you load it up is that it will trade again the instant the basket closes. To overcome this, I have included the 'safety feature' common to my Waiting to Trade EA's. If you need to restart your platform with a basket open, denying sending the trades still allows Snow to monitor the basket.
You will see that I have cleaned up the pips/points thingy. The code is courtesy of Lifesys (Paul), and now I see what Gary was getting at. Paul used Janet and John words in the Big Print version, so I got it.Over the next couple of days, I will port this across to all the other Shelley variants.
Jem will tell you what he intends doing with this, but to quote a little from one of his pm's; "I'm hell bent on making 10.2 work as a basket system. Watching 400 pips rack up in an hour is addictive! It also saves from worrying about where to put stops and limits and saves from hours in front of the charts because all we wait for is for the ducks to line up and then ka-blimey."
Sounds like A Plan to me.
Code: Select all
int multiplier = 1;
if(Digits == 2 || Digits == 4) multiplier = 1;
if(Digits == 3 || Digits == 5) multiplier = 10;
if(Digits == 6) multiplier = 100;
if(Digits == 7) multiplier = 1000;
if (multiplier > 1) PipDescription = " points";
TakeProfit*= multiplier;Code: Select all
int PFactor(string pair)
{
//This code supplied by Lifesys. Many thanks Paul - we all owe you. Gary was trying to make me see this, but I
//coould not understand his explanation. Paul used Janet and John words
int PipFactor=10000; // correct factor for most pairs
if (StringFind(pair,"JPY",0) != -1 || StringFind(pair,"XAG",0) != -1)
PipFactor = 100; // if jpy or silver
if (StringFind(pair,"XAU",0) != -1)
PipFactor = 10; // if gold
return (PipFactor);
}//End int PFactor(string pair)Code: Select all
MyValueInPoints = MyValueInPips * MarketInfo(Symbol(), MODE_POINT))Code: Select all
MyDeltaInPips = NormalizeDouble ( (OrderOpenPrice() - Bid ) / MarketInfo(symbol, MODE_POINT), MarketInfo(symbol, MODE_DIGIT) )- Jemook
- Trader
- Posts: 1085
- Joined: Thu May 10, 2012 10:19 am
- Location: Bondi, Sydney, Australia
Re: ShelleyJem. Fantastic collision of accident and analysis
Amazeballs. Thanks Steve, will report back with me findings.SteveHopwood wrote:Here is one I coded for Jem.
Please note I am no longer affiliated with Global Prime. I've moved on to my next adventure with Afterprime.
Catch me here: https://www.afterprime.com
Catch me here: https://www.afterprime.com
- 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: ShelleyJem. Fantastic collision of accident and analysis
Discuss it with Paul, preferably by pm so we do not clutter up the thread with technical discussion. I don't actually care why Paul uses the code he uses. It works.phil_trade wrote:Great Steve... I'm Happy you don't use anymoreSteveHopwood wrote:Here is one I coded for Jem. He wants a basket trader that sends a mixed basket of buys/sells as soon as he loads up the ea- all other take profit etc stuff left in place. The Buy/Sell pair input defaults are not suggestions; something has to be the default or there is no trade.
The problem with a bot that trades the instant you load it up is that it will trade again the instant the basket closes. To overcome this, I have included the 'safety feature' common to my Waiting to Trade EA's. If you need to restart your platform with a basket open, denying sending the trades still allows Snow to monitor the basket.
You will see that I have cleaned up the pips/points thingy. The code is courtesy of Lifesys (Paul), and now I see what Gary was getting at. Paul used Janet and John words in the Big Print version, so I got it.Over the next couple of days, I will port this across to all the other Shelley variants.
Jem will tell you what he intends doing with this, but to quote a little from one of his pm's; "I'm hell bent on making 10.2 work as a basket system. Watching 400 pips rack up in an hour is addictive! It also saves from worrying about where to put stops and limits and saves from hours in front of the charts because all we wait for is for the ducks to line up and then ka-blimey."
Sounds like A Plan to me.
but why all this codeCode: Select all
int multiplier = 1; if(Digits == 2 || Digits == 4) multiplier = 1; if(Digits == 3 || Digits == 5) multiplier = 10; if(Digits == 6) multiplier = 100; if(Digits == 7) multiplier = 1000; if (multiplier > 1) PipDescription = " points"; TakeProfit*= multiplier;
as it' so simple IMHO to convert each pairs Point/Pips withCode: Select all
int PFactor(string pair) { //This code supplied by Lifesys. Many thanks Paul - we all owe you. Gary was trying to make me see this, but I //coould not understand his explanation. Paul used Janet and John words int PipFactor=10000; // correct factor for most pairs if (StringFind(pair,"JPY",0) != -1 || StringFind(pair,"XAG",0) != -1) PipFactor = 100; // if jpy or silver if (StringFind(pair,"XAU",0) != -1) PipFactor = 10; // if gold return (PipFactor); }//End int PFactor(string pair)
andCode: Select all
MyValueInPoints = MyValueInPips * MarketInfo(Symbol(), MODE_POINT))
no ?Code: Select all
MyDeltaInPips = NormalizeDouble ( (OrderOpenPrice() - Bid ) / MarketInfo(symbol, MODE_POINT), MarketInfo(symbol, MODE_DIGIT) )
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.
Re: ShelleyJem. Fantastic collision of accident and analysis
"Amazeballs"Jemook wrote:Amazeballs. Thanks Steve, will report back with me findings.SteveHopwood wrote:Here is one I coded for Jem.
Have fun.
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.
- Baluda
- Trader
- Posts: 330
- Joined: Mon Feb 06, 2012 2:00 pm
- Location: An insignificant village in the Netherlands
Re: ShelleyJem. Fantastic collision of accident and analysis
Sorry about the code but this how I calculate pips:
The last line is a shortcut and is bound to fail in non-standard conditions (>5 digit brokers, non currency symbols)
Just to let you know.
Paul
Code: Select all
double pips;
pips = OrderProfit() + OrderSwap() + OrderCommission();
pips /= OrderLots();
pips /= MarketInfo( OrderSymbol(), MODE_TICKVALUE );
if ( showRealPipsInsteadOfPoints )
{
pips /= MathMod ( MarketInfo ( OrderSymbol(), MODE_DIGITS ), 2 ) * 9 + 1;
}
Just to let you know.
Paul
Check the MQL4 Market for my best EA's and Indicators.
-
garyfritz
Re: ShelleyJem. Fantastic collision of accident and analysis
Ah, Janet and John sound like the UK version of what us Yanks knew as Dick and Jane. (And their puppy Spot and kitty Puff.SteveHopwood wrote:You will see that I have cleaned up the pips/points thingy. The code is courtesy of Lifesys (Paul), and now I see what Gary was getting at. Paul used Janet and John words in the Big Print version, so I got it.![]()
Funny, I recall someone ranting about people who could not follow Post 1 when it contained too many two-syllable words.
I will be careful to use BIG PRINT WORDS in future.
-
SWG123
- Trader
- Posts: 565
- Joined: Wed Nov 16, 2011 3:02 pm
- Location: Cape Town
Re: ShelleyJem. Fantastic collision of accident and analysis
Ouch!garyfritz wrote:Funny, I recall someone ranting about people who could not follow Post 1 when it contained too many two-syllable words.![]()
- 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: ShelleyJem. Fantastic collision of accident and analysis
It would be a help, so long as they are one-syllable.garyfritz wrote:Ah, Janet and John sound like the UK version of what us Yanks knew as Dick and Jane. (And their puppy Spot and kitty Puff.SteveHopwood wrote:You will see that I have cleaned up the pips/points thingy. The code is courtesy of Lifesys (Paul), and now I see what Gary was getting at. Paul used Janet and John words in the Big Print version, so I got it.![]()
Funny, I recall someone ranting about people who could not follow Post 1 when it contained too many two-syllable words.![]()
I will be careful to use BIG PRINT WORDS in future.
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.