ShelleyJem. Fantastic collision of accident and analysis

Share your 10.x automated traders here.
Locked
fxshadow
Trader
Posts: 61
Joined: Tue Nov 15, 2011 11:46 pm

Re: ShelleyJem. Fantastic collision of accident and analysis

Post by fxshadow »

Getting this error on SJ 1h.

2012.06.12 08:38:52 ShelleyJem GBPJPYm,Daily: invalid double number as parameter 2 for GlobalVariableSet function
User avatar
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

Post by SteveHopwood »

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. :lol: 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.

:D
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.
phil_trade

Re: ShelleyJem. Fantastic collision of accident and analysis

Post by phil_trade »

SteveHopwood 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. :lol: 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.

:D
Great Steve... I'm Happy you don't use anymore

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;
but why all this code, which will not be good for ex. GBPCHF with MIG BANK, which is not exaustif

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)
as it' so simple IMHO to convert each pairs Point/Pips with

Code: Select all

MyValueInPoints = MyValueInPips * MarketInfo(Symbol(), MODE_POINT))
and

Code: Select all

MyDeltaInPips = NormalizeDouble ( (OrderOpenPrice() - Bid ) / MarketInfo(symbol, MODE_POINT), MarketInfo(symbol, MODE_DIGIT) )
no ?
User avatar
Jemook
Trader
Posts: 1085
Joined: Thu May 10, 2012 10:19 am
Location: Bondi, Sydney, Australia

Re: ShelleyJem. Fantastic collision of accident and analysis

Post by Jemook »

SteveHopwood wrote:Here is one I coded for Jem.
Amazeballs. Thanks Steve, will report back with me findings.
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
User avatar
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

Post by SteveHopwood »

phil_trade wrote:
SteveHopwood 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. :lol: 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.

:D
Great Steve... I'm Happy you don't use anymore

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;
but why all this code

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)
as it' so simple IMHO to convert each pairs Point/Pips with

Code: Select all

MyValueInPoints = MyValueInPips * MarketInfo(Symbol(), MODE_POINT))
and

Code: Select all

MyDeltaInPips = NormalizeDouble ( (OrderOpenPrice() - Bid ) / MarketInfo(symbol, MODE_POINT), MarketInfo(symbol, MODE_DIGIT) )
no ?
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.

:D
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.
User avatar
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

Post by SteveHopwood »

Jemook wrote:
SteveHopwood wrote:Here is one I coded for Jem.
Amazeballs. Thanks Steve, will report back with me findings.
"Amazeballs" :roll:

Have fun.

:D
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.
User avatar
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

Post by Baluda »

Sorry about the code but this how I calculate pips:

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;
}
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
Check the MQL4 Market for my best EA's and Indicators.
garyfritz

Re: ShelleyJem. Fantastic collision of accident and analysis

Post by garyfritz »

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. :lol:
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. :))

Funny, I recall someone ranting about people who could not follow Post 1 when it contained too many two-syllable words. :lol: :lol:

I will be careful to use BIG PRINT WORDS in future. :lol:
SWG123
Trader
Posts: 565
Joined: Wed Nov 16, 2011 3:02 pm
Location: Cape Town

Re: ShelleyJem. Fantastic collision of accident and analysis

Post by SWG123 »

garyfritz wrote:Funny, I recall someone ranting about people who could not follow Post 1 when it contained too many two-syllable words. :lol: :lol:
Ouch! :lol:
User avatar
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

Post by SteveHopwood »

garyfritz wrote:
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. :lol:
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. :))

Funny, I recall someone ranting about people who could not follow Post 1 when it contained too many two-syllable words. :lol: :lol:

I will be careful to use BIG PRINT WORDS in future. :lol:
It would be a help, so long as they are one-syllable.

:D
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.
Locked

Return to “10.x EA forum”