EA slippage
-
Do you really mean PIPs? PIP, Point, or Tick are all different in general.
What is a TICK? - MQL4 programming forum (2014.08.03) -
Do you really mean slippage and not the spread?
Most brokers with variable spread widen considerably at end of day (5 PM ET) ± 30 minutes. My GBPJPY (OANDA) shows average spread = 26 points, but average maximum spread = 134 (your broker will be similar). The charts show Bid prices only. Turn on the Ask line to see how big the spread is, Tools → Options (control+O) → charts → Show ask line.
EA entry is entering trades at the end of a candle instead of at the beginning. How do i get the EA to recognise the candle opening and enter trade within 0.2 of a pip instead of 3 pips away, similar issues with exits? Any help would be good so i can resolve issues, as the EA entries and exits is ruining my day trading with particular strategy i use.
int g_lastReceivedBarCount; // Used to keep track of number of bars and detect new bar arrival int OnInit() { .... g_lastReceivedBarCount = Bars(Symbol(), PERIOD_CURRENT); .... } void OnTick() { .... int currentBarCount = Bars(Symbol(), PERIOD_CURRENT); bool onFirstTickOfNewCandle = false; if (g_lastReceivedBarCount != currentBarCount) { onFirstTickOfNewCandle = true; g_lastReceivedBarCount = currentBarCount; } .... }
Use onFirstTickOfNewCandle variable to regulate the entry to beginning of candle... If this doesn't work. keep track of ticks count using GetTickCount() function
Use onFirstTickOfNewCandle variable to regulate the entry to beginning of candle... If this doesn't work. keep track of ticks count using GetTickCount() function
thanks,Margaret
Thanks
Margaret
Hi Folks
How can i stop slippage with my EA, when a trade is triggered the entry point can be 4 pips away i have even seen 7 pips slippage, as i was testing demo EA developer stated must be slippage is there anyway i can correct this as is not worth using my EAs for trading as losing all my trades with the strategies i use.?
any advice welcome
thanks