I am trying to code a MA crossover EA-Looking for Assistance with the Code - page 2

 
barnacle7:
Thats all I get Just the Error :130 , and it doesn't matter how long I let it run for it continues to deliver that error on every tick.
 
barnacle7:

Thats all I get Just the Error :130 , and it doesn't matter how long I let it run for it continues to deliver that error on every tick.

OK,  that makes a lot of sense . . . .  do yourself a favour,  learn how to run an EA on the Strategy Tester,  it will probably open trades in the Strategy Tester.

 

Then when you have done that ,  read some of the posts you will find here: ECN 

 

By the way, did you look up what error 130 means ?  Error 130   

ERR_INVALID_STOPS130Stops are too close, or prices are ill-calculated or unnormalized (or in the open price of a pending order). The attempt can be repeated only if the error occurred due to the price obsolescense. After 5-second (or more) delay, it is necessary to refresh data using the RefreshRates function and make a retry. If the error does not disappear, all attempts to trade must be stopped, the program logic must be changed.

 
RaptorUK:

OK,  that makes a lot of sense . . . .  do yourself a favour,  learn how to run an EA on the Strategy Tester,  it will probably open trades in the Strategy Tester.

 

Then when you have done that ,  read some of the posts you will find here: ECN 

 

By the way, did you look up what error 130 means ?  Error 130   

ERR_INVALID_STOPS130Stops are too close, or prices are ill-calculated or unnormalized (or in the open price of a pending order). The attempt can be repeated only if the error occurred due to the price obsolescense. After 5-second (or more) delay, it is necessary to refresh data using the RefreshRates function and make a retry. If the error does not disappear, all attempts to trade must be stopped, the program logic must be changed.

 

My platform isn't ECN it is STP  and I have already been able to get orders to be trasmited to MT4 using the code Ordersend()  ,Yes I read what Error 130 is but looking at the parameters in this  MQL4 "Simple EA", the stops are set taking into consideration minimum levels. Have you tried to run the link (EA) ? surely you can work out what is wrong with the coding of the "Simple EA" ? if you can't what chance do I have. https://book.mql4.com/samples/expert

 
barnacle7:

My platform isn't ECN it is STP  and I have already been able to get orders to be trasmited to MT4 using the code Ordersend()  ,Yes I read what Error 130 is but looking at the parameters in this  MQL4 "Simple EA", the stops are set taking into consideration minimum levels. Have you tried to run the link (EA) ? surely you can work out what is wrong with the coding of the "Simple EA" ? if you can't what chance do I have. https://book.mql4.com/samples/expert

Oh I see,  you want me to run the code, diagnose the issue,  and fix the code for you ?  why didn't you say . . . .

Try running this and let me know the Alerts for the failed Buy Order . . .

 

 
RaptorUK:

Oh I see,  you want me to run the code, diagnose the issue,  and fix the code for you ?  why didn't you say . . . .

Try running this and let me know the Alerts for the failed Buy Order . . .

 

 The Alerts are  1.Attempt to Buy ,Waiting response..,    2.Buy-Ask: 133687 Bid:1.33673 StopLevel 20 SL 1.33473 TP 1.33712     3. Freeze Level:0   4. Error Occured:130 

Screen Shot also attached 

 Since the TP looked tight ,I also tried changing the "Take Profit Parameter in the "Inputs Tab" to 390  at set up but still just generated the same alerts as above, except for the Increased TP which reflected the change I made.

Thanks

 

 

Try to read this FX Lesson 2MA

 
barnacle7:

 The Alerts are  1.Attempt to Buy ,Waiting response..,    2.Buy-Ask: 133687 Bid:1.33673 StopLevel 20 SL 1.33473 TP 1.33712     3. Freeze Level:0   4. Error Occured:130 

Screen Shot also attached 

 Since the TP looked tight ,I also tried changing the "Take Profit Parameter in the "Inputs Tab" to 390  at set up but still just generated the same alerts as above, except for the Increased TP which reflected the change I made.

Thanks

Please do this simple check for me,  in your platform press F9 to bring up the manual trading window . . . .  do the boxes to enter SL & TP look like this . . .  greyed out  ?

 

 

or like this,  not greyed out and can be set  ?

 

 
RaptorUK:

Please do this simple check for me,  in your platform press F9 to bring up the manual trading window . . . .  do the boxes to enter SL & TP look like this . . .  greyed out  ?

 

 

or like this,  not greyed out and can be set  ?

 

 

The SL & TP are Greyed out .
 
barnacle7:
The SL & TP are Greyed out .
OK then,  as I said before,  "Then when you have done that ,  read some of the posts you will find here: ECN "   you have an ECN type Broker . . .
Reason: