You are mixing apples with onions.
Bid is price but ATR is the difference of two prices! Maybe you meant something like:
if(Bid > entry + c*iATR(..) ) { ...
Please use the SRC button for posted code.
Carl Schreiber:
You are mixing apples with onions.
Bid is price but ATR is the difference of two prices! Maybe you meant something like:
Please use the SRC button for posted code.
Thank you very much!! Yes, that's what I'm after!
Apologies for expressing it misleadingly
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hello,
this is my rule for closing a sell trade:
if((Bid>iATR(NULL,0,14,1)))
please could somebody tell me what I need to change in that code if I wanted to use three times the ATR (14) value (creating more distance from the bid, not a longer lookback period for the ATR)?
Thank you!