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 1 of 2
Author:  fx800 [ Tue Aug 20, 2013 1:14 pm ]
Post subject:  HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

I am getting error 130 with pending buy and sell scripts when trading Dow Jones and USOIL, no problem with forex pairs.

Can this be fixed ?

Thanks in advance.

peter
Author:  fxdaytrader [ Tue Aug 20, 2013 1:53 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

see attached files ...
changed the pfactor-function (you were using the old one, steves new one does the job) and added normalizelots/normalizeprice ...
Author:  fx800 [ Tue Aug 20, 2013 2:25 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

fxdaytrader wrote:see attached files ...
You are really a star.

Many thanks. I will try the scripts on demo first. The Dow is now trending lower. The scripts will come in very handy.

peter
Author:  fx800 [ Tue Aug 20, 2013 2:41 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

fx8000 wrote:
fxdaytrader wrote:see attached files ...
You are really a star.

Many thanks. I will try the scripts on demo first. The Dow is now trending lower. The scripts will come in very handy.

peter
Still getting the same error 130 invalid stops with dow jones.
Author:  fxdaytrader [ Tue Aug 20, 2013 3:06 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

changed the method back to the old "pips2dbl", pls try again :)

edit: corrected the OrderSymbol() mistake and uploaded again...
Author:  fx800 [ Tue Aug 20, 2013 3:28 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

fxdaytrader wrote:changed the method back to the old "pips2dbl", pls try again :)
IT IS WORKING NOW !

WELL DONE, FXDAYTRADER.

:D :D :D
Author:  fxdaytrader [ Tue Aug 20, 2013 3:30 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

:P nice to hear :)
I forgot to mention: If you set UseOldPipAdjust=false then the other method (pfactor()) will be used again ... ;)

ups, and search in the code for OrderSymbol() and change it to Symbol() (2 times) ...
Author:  fx800 [ Tue Aug 20, 2013 3:38 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

fxdaytrader wrote::P nice to hear :)
I forgot to mention: If you set UseOldPipAdjust=false then the other method (pfactor()) will be used again ... ;)

ups, and search in the code for OrderSymbol() and change it to Symbol() (2 times) ...
Are you saying I should change OrderSymbol() to Symbol() ?

Code: Select all

  
   if (UseOldPipAdjust)
    {
      double digits = MarketInfo(OrderSymbol(),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(OrderSymbol(),MODE_POINT) * multiplier; 
Author:  fxdaytrader [ Tue Aug 20, 2013 3:47 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

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) ...
Author:  fx800 [ Tue Aug 20, 2013 3:56 pm ]
Post subject:  Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

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.
All times are UTC Page 1 of 2