Hello I want to add a condition to my purchase code.
- Call ATR in EA
- [WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you.
- How to write code based on the following conditions
- Please post only in English on this forum. Use the automatic translation tool if needed. Use simple language structure when using mechanical translation. 2013.08.09
- ATR is the size of the bars. It will never be higher than price.
// i assume your code is MQL4 //add this before buy function: if(ATRBuy > Ask*(2+100)/100 )return;
I forgot to specify. I am using metatrader 5
MqlTick latest_price; if(!SymbolInfoTick(_Symbol,latest_price)) return; double Ask = latest_price.ask; if(ATRBuy > Ask*(2+100)/100 )return;
then add this
sonra bunu ekle
I HAVE TRIED THESE CODES. DOES NOT OPERATE AT ALL. I ONLY WANT IT NOT TO TRANSACTION IF THERE IS A 2% DIFFERENCE
Do you actually have code? Not a .EXn; real code? Then no one can help you; you didn't purchase the code.
Gerçekten kodunuz var mı? .EXn değil; gerçek kod? O zaman kimse sana yardım edemez; kodu satın almadınız.
yes ı have got
elbette çünkü " Ortalama Gerçek Aralık " her zaman fiyattan daha düşüktür çünkü fiyat değişim aralığıdır, ancak siz bunu istediniz: \ ATR ile fiyattan çok ne demek istediğinizi açıklayın, ATR'nin ne olduğunu biliyor musunuz?
That's how I use the atrbuy line