Strategy tester does not use the trading server.
Only once to get data but that would mean you just installed a fresh copy is that the case ?
Strategy tester does not use the trading server.
Only once to get data but that would mean you just installed a fresh copy is that the case ?
#include<Trade\Trade.mqh> CTrade trade; void OnTick() { double Ask=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits); double Bid=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits); string signal=""; MqlRates PriceArray[]; ArraySetAsSeries(PriceArray,true); int Data =CopyRates(_Symbol,_Period,0,3,PriceArray); double EAArray[]; ArraySetAsSeries(EAArray,true); int iVIDyADefinition =iVIDyA(_Symbol,_Period,3,5,0,PRICE_CLOSE); CopyBuffer(iVIDyADefinition,0,0,3,EAArray); float iVIDyAVALUE=EAArray[0]; if (iVIDyAVALUE>PriceArray[1].close) signal="sell"; if (iVIDyAVALUE<PriceArray[1].close) signal="buy"; if (signal =="sell" && PositionsTotal()<1) trade.Sell(1,NULL,Bid,0,(Bid-150 * _Point),NULL); if (signal =="buy" && PositionsTotal()<1) trade.Buy(1,NULL,Ask,0,(Ask+150 * _Point),NULL); Comment ("The current signal is: ",signal); }
no trades?
is it that my broker has problem?
sorry I did not install fresh copy. should I?
Strategy tester runs on a local datafeed from your harddisk.
It has nothing to do with other users or computers/servers unless you mean that you are using the cloud network.
no fresh copy
no cloud
no changes made and using strategy tester with the above code was placing trades just before creating this post..
now this same code does not place any trades. no changes made except for time lost.
It's a problem on your end.
Check your parameters.
![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