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

HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3078
Page 2 of 2
Author:  fx800 [ Tue Aug 20, 2013 4:24 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

fx8000 wrote:
fxdaytrader wrote:Yes, I overlooked that by copy&pasting ...

On the other hand - It seems that it does not matter (I think when OrderSymbol() ist empty, it will be set to NULL, that could be the reason because it is working as desired). Better change to Symbol(), thats correct ...

btw I uploaded the scripts again (with the mistake corrected) ...
Thanks.
The latest update doesn't work, the one with OrderSymbol works :P
Author:  fxdaytrader [ Tue Aug 20, 2013 4:49 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

That is confusing me, :shock:

I did a "debug run" (just put on the begin of start() {):

Code: Select all

Alert("symbol: "+Symbol()+"|OrderSymbol: "+OrderSymbol()+"|null: "+NULL); return;
result:
Symbol() = DAX30
OrderSymbol() = (NOTHING)
NULL = 0

NULL seems to work also. Interesting to know.

Is this one "crapperquotes housemade problem"? I don't know. :mrgreen:
Author:  fx800 [ Wed Aug 21, 2013 6:01 am ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

fxdaytrader wrote:That is confusing me, :shock:

I did a "debug run" (just put on the begin of start() {):

Code: Select all

Alert("symbol: "+Symbol()+"|OrderSymbol: "+OrderSymbol()+"|null: "+NULL); return;
result:
Symbol() = DAX30
OrderSymbol() = (NOTHING)
NULL = 0

NULL seems to work also. Interesting to know.

Is this one "crapperquotes housemade problem"? I don't know. :mrgreen:
Crapperquotes homemade problem indeed !

It seems changing back to the old fashioned POINT MULTIPLIER works a charm.

May be that is why the old ea like Fratelli using pending orders works without any problem because it uses the old fashioned point multiplier.

Code: Select all

    //Adapt to x digit criminals   //fx8000 mod
   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";
   
   TakeProfitPips*= multiplier;
   StopLossPips*= multiplier;
   //HiddenPips*= multiplier;
   BufferPips*= multiplier;
   //MaxSpread *= multiplier;
Author:  fxdaytrader [ Wed Aug 21, 2013 6:17 am ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

You forgot the "Point", look in my version ;) -

Code: Select all

      int digits = MarketInfo(NULL,MODE_DIGITS);
      int multiplier=1;
      if(digits==2 || digits==3 || digits==5) multiplier = 10;
      if(digits==6) multiplier = 100;
      if(digits==7) multiplier = 1000;
      pips2dbl = MarketInfo(NULL,MODE_POINT) * multiplier;
     
     stop = NormalizePrice(Symbol(),StopLossPips*pips2dbl);
     take = NormalizePrice(Symbol(),TakeProfitPips*pips2dbl);
And there is it where we got the problem - MarketInfo(Symbol() ... did not work, but MarketInfo(OrderSymbol() did it, as well as MarketInfo(NULL,...

It is tricky, I read that some brokers does not return values for MarketInfo+Digits, so maybe we have to check also if there is something returned and if not then use the simple Point/Digits (what would not work in multipair EAs) ... :mrgreen:

btw - If I considered my broker as a "criminal", I would not hesitate to change the broker. :mrgreen:

edit: In "our" pending-orders version of bob and shelley again EA I will implement the choice whether to use the pipfactor-stuff or the pips2dbl-things. It should not be tricky to implement that, if use pips2dbl we must set factor=1 and calculate the pips2dbl-stuff in the init section. I will do it within the next update
All times are UTC Page 2 of 2