- learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
- "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
I just want the "lowest" variable to be the lowest iATR readout from the past 100 candles.
double atrhist; double lowest; void atrcheck() { for(int i=0; i<100; i++) { atrhist=iATR(Symbol(),0,14,i); if (atrhist<lowest) lowest=atrhist; Print(atrhist); }}My EA places orders based on weather the current iATR is above or below lowest*2.
void atrcheck() { lowest=iATR(Symbol(),0,14,0); for(int i=1; i<100; i++) { atrhist=iATR(Symbol(),0,14,i); if (atrhist<lowest) lowest=atrhist; Print(atrhist); }}
Do you really want to include the incomplete ATR value for bar 0 in your calculations?
GumRai:
no.... but im guessing i just change the iATR setting for that at lowest. thank you very much for your assistance.
Do you really want to include the incomplete ATR value for bar 0 in your calculations?
double atrhist; double lowest; void atrcheck() { for(int i=0; i<100; i++) { atrhist=iATR(Symbol(),0,14,i); if (atrhist<lowest) << what is the value of lowest at the start of the loop? lowest=atrhist; Print(atrhist); }}
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
Can anyone help me or provide me a sample snippet of code? I went through the official literature but it just does not want to work for me.