Where is the problem?
help me code?
i know how to code but i have a mental block on how to go about doing it. appreciate if someone can help me with the skeleton part
Build static variables or arrays depending what kind of statistic you need
Loop trough all candles
for each candle do the math
When loop is finished, evaluate
Build static variables or arrays depending what kind of statistic you need
Loop trough all candles
for each candle do the math
When loop is finished, evaluate
yup, i thought of that but when fri close early, the time hour screw me up. so i kinda stuck how to proceed.
holiday close early too.
btw, im using fxdd account.
Life would be so much easier if the market traded 24/7/365 . . . but it doesn't so you have to use your intelligence, ingenuity and cunning to code around it.
For example (and I'm going to look stupid if this is wrong) . . . how to find the last bar (H1) of the last week regardless of the TimeZone that the Broker is on ?
datetime Sat10am = TimeCurrent() - (TimeCurrent()% (PERIOD_D1*60)) + 1 + (10 * PERIOD_H1 * 60 ) - ((TimeDayOfWeek(TimeCurrent() - (TimeCurrent()% (PERIOD_D1*60)) + 1) + 1) * PERIOD_D1 * 60) ; int WeekLastBar = iBarShift(NULL, PERIOD_H1, Sat10am);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi All,
I need a script to tell me the statistic of if the day is bull candle, the hours (as in the time) of hourly candle that close above the opening price for that day and over a few days.
for bear candle, the hourly candle that close below the open price of that day.
anyone can help me?