int init(){ OnInitStart(); : // no long running tasks allowed in init. Comment(WindowExpertName()," init complete"); } : bool first; OnInitStart(){ first = true; } int start(){ if (first){ first = false; : // do long running initialization tasks here like network connections and large computations } :Note that start will not run until the first tick is received (weekends,) or you force it.
2 accounts 1 demo 1 real VPS same broker. It looks to me like my EA in my real account is not being initialized. I have a comment in my Init() section that displays The magic number on the chart, I only see that in the demo chart. The EA is should send an email telling me that its loaded and ready to trade. That is done in the Start() function. I am not getting the email from the VPS account. Yes my email is setup on the VPS machine. It does email me 136 errors just fine on every trade, another issue in different thread.
This is my 2nd day using a VPS. Am I missing some setting that I should know about? Shouldn't the EA be initalized and start running once it's dropped on the chart? I see the :) in the top right corner.
I load my EA onto the demo account and in my experts tab I see:
I load my EA onto my real acct and in my experts tab I see:
Are you saying, the EA in a sense was not even "booted" up in broker VPS? It seems to me you are using some browser-based from your PC to run EAs, no?
Are you saying, the EA in a sense was not even "booted" up in broker VPS? It seems to me you are using some browser-based from your PC to run EAs, no?
No I am use remote desktop to connect to the sever which has a instance of MT4 running. I drop my ea's on that MT4 and disconnect. It will run on that machine. "Should run"
It was running on Sunday/Monday fine. I had a trading error, a 136 so I fixed that and dropped new version onto both my demo account and the VPS machine. Again the demo is running fine and making trades. The identical EA on the VPS machine, this time just sit there. The smile face smiling on the chart ticks are moving, Experts and live trading are enabled but the EA seams to have not initialized.
I am going to try WH's suggestion. I do have some code in the init section but very minor stuff, the magic number comment, One function call to set my error level and a check on one external variable to set it to a default number of the user made it 0. No loops or anything like that. The magic number comment is the second line in the init section.
Very frustrating,
No I am use remote desktop to connect to the sever which has a instance of MT4 running. I drop my ea's on that MT4 and disconnect. It will run on that machine. "Should run"
It was running on Sunday/Monday fine. I had a trading error, a 136 so I fixed that and dropped new version onto both my demo account and the VPS machine. Again the demo is running fine and making trades. The identical EA on the VPS machine, this time just sit there. The smile face smiling on the chart ticks are moving, Experts and live trading are enabled but the EA seams to have not initialized.
I am going to try WH's suggestion. I do have some code in the init section but very minor stuff, the magic number comment, One function call to set my error level and a check on one external variable to set it to a default number of the user made it 0. No loops or anything like that. The magic number comment is the second line in the init section.
Very frustrating,
It can be that the VPS, behaves like some App server, where it actually takes a copy of your files (and NOT the original ones) and runs the copy. So whatever you load recently is actually denied from overwriting.
I suggest you to rename your EA differently, and whenever you have a new version -- DON'T use the same name as the previous.
Init must return with in two seconds. Use this pattern instead:
Note that start will not run until the first tick is received (weekends,) or you force it.
Changed the init section, same thing. Smile face in corner and nothing, no comment. Double checked the settings, allow trading experts enable... Same as my demo account.
Thinking about dumping the VPS for now and just using clientside. At least test it that way. I need to go over the doc again, maybe I missed something, I did get it to run the the first time I used it so I don't think I missed anything.
Thank for everyone suggestions. I'll post when I have a resolution to this.
2011.10.05 12:00:57 Invictus_v2.9 EURAUD,M5 inputs: MagicNumber=0; MaTimeFrame=5; MaPeriod=13; MaMethod=0; MaPrice=0; Stack=5; DistanceApart=30; StopLoss=0; TrailingStopLossStep=0; TakeProfit=550; Risk=0.03; LotSize=0.1; Lots=0.1; Slippage=20; OpenHour=21; CloseHour=18; Shift=1; bShift=9; BarRun=5; DistanceAwayLower=0.003; BarVolume=1500; RetryAttempts=10; Level=3; EmailCommunication=true; 2011.10.05 12:00:45 Invictus_v2.9 EURAUD,M5: loaded successfully 2011.10.05 12:00:38 Invictus_v2.8 EURAUD,M5: removed 2011.10.05 12:00:30 Invictus_v2.8 EURCHF,M5: removed 2011.10.05 12:00:24 Invictus_v2.8 EURUSD,M5: removed
You might want to try and test VPS using this approach:
Have the EA to place a random stop/limit order some hundred points away from the market immediately upon loaded. Then, delete those orders, once successfully filled. Keep this going for all the time in VPS, see how it performs.
No I am use remote desktop to connect to the sever which has a instance of MT4 running. I drop my ea's on that MT4 and disconnect. It will run on that machine. "Should run"
It was running on Sunday/Monday fine. I had a trading error, a 136 so I fixed that and dropped new version onto both my demo account and the VPS machine. Again the demo is running fine and making trades. The identical EA on the VPS machine, this time just sit there. The smile face smiling on the chart ticks are moving, Experts and live trading are enabled but the EA seams to have not initialized.
I am going to try WH's suggestion. I do have some code in the init section but very minor stuff, the magic number comment, One function call to set my error level and a check on one external variable to set it to a default number of the user made it 0. No loops or anything like that. The magic number comment is the second line in the init section.
Very frustrating,
Hi Dan: How are you doing? Is the VPS working?
Best Rgds
Hi Dan: How are you doing? Is the VPS working?
Best Rgds
I just got it working a few minutes ago, lol. I rebooted the friggen server. Dropped my EA back on and everything seams to be working ok now. I also had them set me up with a demo account on the VPS itself. I was having a order issue that I need to test to see if I fixed it, only on the VPS. Now that I have a demo on the VPS it should be easier/less expensive to force trades to check my order logic. There is some difference between the VPS and the client MT4 on my laptop that I havent figured out yet. but it should not be long now.
I also did a small test about 30 minutes ago to see if the ticks where faster or slower on the VPS machine vs my demo account on my laptop. Big difference. The demo stopped getting ticks for about 20 seconds on my laptop and the VPS MT4 was fine. the EUR mover 5 or 6 pips on the VPS while my client side was sleeping. My VPS is free so I plan on using that for my real account.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
2 accounts 1 demo 1 real VPS same broker. It looks to me like my EA in my real account is not being initialized. I have a comment in my Init() section that displays The magic number on the chart, I only see that in the demo chart. The EA is should send an email telling me that its loaded and ready to trade. That is done in the Start() function. I am not getting the email from the VPS account. Yes my email is setup on the VPS machine. It does email me 136 errors just fine on every trade, another issue in different thread.
This is my 2nd day using a VPS. Am I missing some setting that I should know about? Shouldn't the EA be initalized and start running once it's dropped on the chart? I see the :) in the top right corner.
I load my EA onto the demo account and in my experts tab I see:
I load my EA onto my real acct and in my experts tab I see: