HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fx800 »

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
You do not have the required permissions to view the files attached to this post.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fxdaytrader »

see attached files ...
changed the pfactor-function (you were using the old one, steves new one does the job) and added normalizelots/normalizeprice ...
You do not have the required permissions to view the files attached to this post.
Last edited by fxdaytrader on Tue Aug 20, 2013 2:42 pm, edited 1 time in total.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fx800 »

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
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fx800 »

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.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fxdaytrader »

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

edit: corrected the OrderSymbol() mistake and uploaded again...
You do not have the required permissions to view the files attached to this post.
Last edited by fxdaytrader on Tue Aug 20, 2013 3:50 pm, edited 1 time in total.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fx800 »

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

WELL DONE, FXDAYTRADER.

:D :D :D
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fxdaytrader »

: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) ...
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fx800 »

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; 
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fxdaytrader »

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) ...
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 130 FOR PENDING ORDER SCRIPT

Post by fx800 »

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.
Post Reply

Return to “Coders Hangout”