Help with an exit.
What is the code to reference data on a previous bar, for example
A buy is placed at the 11:00 oclock bar.
How do you right the code for an if statement to say
If the close price < low of the 11:00 bar
Thanks
Doc
- execute order after candlestick closes
- How can i exit a position with a time stop?
- Help... how do I shift to the right by one bar
Thanks for the info But I would like to say close is < the low of the 11:oo Bar
Regards
Doc
int i;
double elevenOclockLow;
// find most recent 11:00 low on hourly chart
for( i = 0; i < 23; i++){
if(TimeHour(Time[i]) == 11) {
elevenOclockLow = Low[i];
}
}
if(Close[0] < elevenOclockLow){
do stuff...
}
thank you
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