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

ShelleyJem. Fantastic collision of accident and analysis
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=610
Page 16 of 20
Author:  fxshadow [ Tue Jun 12, 2012 1:31 pm ]
Post subject:  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
Author:  SteveHopwood [ Tue Jun 12, 2012 2:27 pm ]
Post subject:  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. :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
Author:  phil_trade [ Tue Jun 12, 2012 2:49 pm ]
Post subject:  Re: ShelleyJem. Fantastic collision of accident and analysis

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 ?
Author:  Jemook [ Tue Jun 12, 2012 2:52 pm ]
Post subject:  Re: ShelleyJem. Fantastic collision of accident and analysis

SteveHopwood wrote:Here is one I coded for Jem.
Amazeballs. Thanks Steve, will report back with me findings.
Author:  SteveHopwood [ Tue Jun 12, 2012 2:53 pm ]
Post subject:  Re: ShelleyJem. Fantastic collision of accident and analysis

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
Author:  SteveHopwood [ Tue Jun 12, 2012 2:54 pm ]
Post subject:  Re: ShelleyJem. Fantastic collision of accident and analysis

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
Author:  Baluda [ Tue Jun 12, 2012 3:26 pm ]
Post subject:  Re: ShelleyJem. Fantastic collision of accident and analysis

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
Author:  garyfritz [ Tue Jun 12, 2012 7:37 pm ]
Post subject:  Re: ShelleyJem. Fantastic collision of accident and analysis

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:
Author:  SWG123 [ Tue Jun 12, 2012 8:37 pm ]
Post subject:  Re: ShelleyJem. Fantastic collision of accident and analysis

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:
Author:  SteveHopwood [ Tue Jun 12, 2012 9:03 pm ]
Post subject:  Re: ShelleyJem. Fantastic collision of accident and analysis

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
All times are UTC Page 16 of 20