yazdforex: it would be so nice if anyone could help me figure out the problem double SAR0=iSAR(NULL,0,0.02,0.2,0); double SAR1=iSAR(NULL,0,0.02,0.2,1); double SL_Buy=Bid-200*Point()*10; double TP_Buy=Bid+50*Point()*10; double SL_Sell=Ask+200*Point()*10; double TP_Sell=Ask-50*Point()*10; double Buyprice=Ask; double Sellprice=Bid; double Lot=(AccountBalance()/10000000); | Those are constant. Assign them in OnTick. |
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all
I faced an issue with mql4 when I tried to write a simple code triggering a signal for entering into a position based on specific set of rules (the simplified code is below). the problem is that despite the set rules EA enters in wrong positions (it opens one candle after the rules become true) and trades where it is not supposed to . another problem is that it seems that after a while EA becomes inactive and does not enter into a trade and I need to drop the EA to the graph again.
it would be so nice if anyone could help me figure out the problem
here is the code