Hi guys,
Mc plot the time in the chart starting from "the finish time frame".
i mean an hourly candle at 11: 00 a.m plotted in the chart means the time from 10:00-11:00.
When i code time filters in a strategy ,for example I don't want take a position after 11:00, i have to say:
t<1100 or t<1200 ?? due to the logic of mc charts it seem to be the second one but i'm not sure.
Maybe is stupid but i'm getting crazy with this stuff because i'm passing lot of code from an older sofware that use the logic 10:00 means the start of the candle (10::-11:00)
thanks a lot,
Alfredo
Time format "disorientation"
Re: Time format "disorientation"
thank you very much for response evdl.
Based on the charts it seems that 11:00 is the bar from 10:00 to 11:00 so i tought that t<1100 mean "do not trade after 10:00.
For print statement you mean adding code in the signal to write text or a debugger option in power language?
Based on the charts it seems that 11:00 is the bar from 10:00 to 11:00 so i tought that t<1100 mean "do not trade after 10:00.
For print statement you mean adding code in the signal to write text or a debugger option in power language?
-
- Posts: 401
- Joined: 19 Jan 2011
- Location: Netherlands
- Has thanked: 85 times
- Been thanked: 125 times
Re: Time format "disorientation"
Just quickly checked this.
Best is to use
With print statements like this
you can output text in the editor and see what happens. With time <= 1100 it will also get the close at 1100 and with time < 1100 it will get the close of 1000.
Best is to use
Code: Select all
If Time <= 1100
Code: Select all
If time_s <= 110000 then begin
Print("Date:",formatdate("dd-MM-yy",eldatetodatetime(date))," Time:", FormatTime("HH:mm:ss", el_timetodatetime_s(time_s)),
" close:", close);
end;
- CrazyNasdaq
- Posts: 322
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 90 times
Re: Time format "disorientation"
Your condition to NOT take position after 11:00 must be this way:
or better you must create a condition to take trades ONLY IF time is before 11:00, so:
if trades must be only into a braket of time:
Code: Select all
if time > 1100 then begin
.... (stop trade)
end;
Code: Select all
if time <= 1100 then begin
.... (trades conditions)
end;
Code: Select all
if time >= begin.time and time <= End.time then begin
..... (Trade conditions)
end;