My script successfully compiles without any errors but won't submit a trade in the strategy tester, and my print function doesn't return a value. - page 4

 
ceejay1962 #:

I ran your code, and didn't see that error. I think it means that the parameters in the indicator call are wrong.

However, I did see a couple of array access issues:

In two places the call to copybuffer reads 2 buffers, when it should read 4 according to how you access the array (AOOneMinute[3] causes an array access error).

Personally, when I write an EA, I prefer to separate the indicator mechanics from the trading logic. I usually have  a ReadIndicators() function in the OnTick() loop that does all the CopyBuffer calls. It is easier for debugging and maintenance.

For example - there is another block of code that does the same.

I have fixed the array issues and the error is still persisting when I run the script through the strategy tester. You mentioned when you ran my code you didn't see that error, I even deleted the Meta 5 Exness desktop application and reloaded it again, and even then the issue still persists. From your experience, do you possibly have an idea what might have been causing this error? Thank you for all your previous help it is appreciated. 

Files:
 
Colin Kimble #:

I have fixed the array issues and the error is still persisting when I run the script through the strategy tester. You mentioned when you ran my code you didn't see that error, I even deleted the Meta 5 Exness desktop application and reloaded it again, and even then the issue still persists. From your experience, do you possibly have an idea what might have been causing this error? Thank you for all your previous help it is appreciated. 

Like last time, I don't see any indicator load errors on my system. Are there any other error messages in the journal?

EDIT: added screenshot - the chart is literally awash with MAs!

indicators

 
ceejay1962 #:

Like last time, I don't see any indicator load errors on my system. Are there any other error messages in the journal?

EDIT: added screenshot - the chart is literally awash with MAs!


The only error I got in the trade journal was stating "trading has been disabled - disabled on server", but I don't think a backtest on a strategy would entail live trading due to it using historical data. Thank you for your previous help. Are there any clues as to what might have caused this?

Files:
 
Colin Kimble #:

The only error I got in the trade journal was stating "trading has been disabled - disabled on server", but I don't think a backtest on a strategy would entail live trading due to it using historical data. Thank you for your previous help. Are there any clues as to what might have caused this?

The trading disabled message you could check with the broker - aside from the indicator errors, were there any other errors in the strategy tester journal tab?

 
ceejay1962 #: The trading disabled message you could check with the broker - aside from the indicator errors, were there any other errors in the strategy tester journal tab?

Hi! Thank you so much for all your help, it is appreciated! I spoke to support from [redacted] and I was told on how to enable the [redacted] Meta 5 desktop application to connect it to a demo account to allow for trading and how to manually enable EA to operate on the desktop application. I did what they told me and still expressed to them how I am still running into the same issue, I forwarded all my log files and screenshots of me complying with their instructions to their tech support. I am convinced the issue lies with a Meta 5 [redacted] configuration setting. I do appreciate all your support. Thank you so much!

 
Colin Kimble #:

Hi! Thank you so much for all your help, it is appreciated! I spoke to support from [redacted] and I was told on how to enable the [redacted] Meta 5 desktop application to connect it to a demo account to allow for trading and how to manually enable EA to operate on the desktop application. I did what they told me and still expressed to them how I am still running into the same issue, I forwarded all my log files and screenshots of me complying with their instructions to their tech support. I am convinced the issue lies with a Meta 5 [redacted] configuration setting. I do appreciate all your support. Thank you so much!

Glad that you are getting somewhere - it does sound like a broker configuration problem. Maybe try a demo account from another broker, if the issue persists. As you have probably found out, it is not allowed to discuss brokers on the forum.

 
ceejay1962 #:

Glad that you are getting somewhere - it does sound like a broker configuration problem. Maybe try a demo account from another broker, if the issue persists. As you have probably found out, it is not allowed to discuss brokers on the forum.

Would it be possible to DM you and ask how you got the results you got with regards to who you set up with etc?

 
Colin Kimble #:

Would it be possible to DM you and ask how you got the results you got with regards to who you set up with etc?

Sure, no problem.

 
ceejay1962 #:

Sure, no problem.

Great news! It has started submitting and works 100% now. Thank you for everything!

 
Colin Kimble #:

Great news! It has started submitting and works 100% now. Thank you for everything!

That is good news!