Hello there,
I created an EA that catches spikes. I backtested and it worked fine. But it fails to catch those spikes during a real-time test. Instead, it opens the position after the market has spike
- Where can I get the fastest news which can affect Forex market?
- Price Spikes
- How can stop loss at different levels be hit at the same time ?
That is hard to do without knowing how your code scans for the spikes...things like does it open positions after new bar
Kekeletso Mofokeng #:
That is hard to do without knowing how your code scans for the spikes...things like does it open positions after new bar
It uses the onTick function to monitor the pip movement of a candle. That is hard to do without knowing how your code scans for the spikes...things like does it open positions after new bar
For instance, get the open and the close price on the current candle. If it is greater than 45 pips. It sends an order to open a position
Alfred Nwanokwai #:
It uses the onTick function to monitor the pip movement of a candle.
It uses the onTick function to monitor the pip movement of a candle.
For instance, get the open and the close price on the current candle. If it is greater than 45 pips. It sends an order to open a position
That the problem...the current bar doesn't have a close price just a high and a low and open
You can adjust your code to something like.
for buy: if (current high - current open) is greater than 45 points buy
for sell: if (current open - current low) is greater than 45 points sell
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