error 130.... please help

[Deleted]  

backtesting occur error 130

what's wrong with my code ?

Simon Gniadkowski
17401
Simon Gniadkowski  
forexparvenu:

Print the error and the relevant variables . . . What are Function return values ? How do I use them ?

Do your trades comply with this ? Requirements and Limitations in Making Trades what are the values for your STOPLEVEL and FREEZELEVEL ?

Keith Watford
Moderator
31751
Keith Watford  
if (Order == OPENBUY) 
{
if (UseBuySL) StopLossLevel = Ask - BuySL * Point; else StopLossLevel = 0.0;
if (UseBuyTP) TakeProfitLevel = Ask + BuyTP * Point; else TakeProfitLevel = 0.0;

Add Print to check what Ask-BuySL*Point actually equates to

[Deleted]  
GumRai:

Add Print to check what Ask-BuySL*Point actually equates to


i added bracket, but still same error.
Simon Gniadkowski
17401
Simon Gniadkowski  
RaptorUK:

Print the error and the relevant variables . . . What are Function return values ? How do I use them ?

Do your trades comply with this ? Requirements and Limitations in Making Trades what are the values for your STOPLEVEL and FREEZELEVEL ?


^^^^^^^^^^^^^^^
[Deleted]  
RaptorUK:

^^^^^^^^^^^^^^^

im checking each part by part now.


so strange because i cant found any mistake .

[Deleted]  
RaptorUK:

^^^^^^^^^^^^^^^

did you found any error on my code ?


please tell me, thanks..

Simon Gniadkowski
17401
Simon Gniadkowski  
forexparvenu:

did you found any error on my code ?

please tell me, thanks..

I can't see your code . . .
[Deleted]  
RaptorUK:
I can't see your code . . .


that's my full code.
Simon Gniadkowski
17401
Simon Gniadkowski  
forexparvenu:

that's my full code.

You have many basic things to fix . . .

You are not checking trading function return values, please fix this: What are Function return values ? How do I use them ?

You must count down in loops, NOT up, where you are closing or deleting Orders, please fix this: Loops and Closing or Deleting Orders

Check you are not trying to place order too close to current price, verify your trades meet these requirements: Requirements and Limitations in Making Trades

If your STOPLEVEL is > 0 you cannot place pending orders at Bid/Ask, what is your STOPLEVEL ?

For a Buy the SL is below the Open price and the TP is above the Open price, the same applies for a BUYSTOP and BUYLIMIT

[Deleted]  
RaptorUK:

You have many basic things to fix . . .

You are not checking trading function return values, please fix this: What are Function return values ? How do I use them ?

You must count down in loops, NOT up, where you are closing or deleting Orders, please fix this: Loops and Closing or Deleting Orders

Check you are not trying to place order too close to current price, verify your trades meet these requirements: Requirements and Limitations in Making Trades

If your STOPLEVEL is > 0 you cannot place pending orders at Bid/Ask, what is your STOPLEVEL ?

For a Buy the SL is below the Open price and the TP is above the Open price, the same applies for a BUYSTOP and BUYLIMIT


thanks for your answer, that's helpful.