Hi John.
I don't see an Arw_mew statement in your code Fernando.
Actually there is.
Look at line 22(?)
Code: Select all
enTimeARW = arw_new(date, time, high, true);
My main objective is quite simple and, after reading your detailed explanation, quite basic I must say.
Through the paint bar statement I'm selecting the European and US cash markets. Since there is a time period where both markets are open together, I mark the end of the European markets with the arrow.
This is something not be used in realtime, but rather for offline and historic studies.
I was able to plot the arrow like I wanted to be plotted on a historic chart:
Code: Select all
Input:
plotUStime (true),
USstTime (830),
USenTime (1515),
plotEUtime (false),
EUstTime (200),
EUenTime (1030),
newsTime (730);
variable:
enTimeARW (0),
stTimeARW (0),
newsARW (0);
if plotEUtime = true then begin
if time = EUstTime then
stTimeARW = arw_new(date, time, high, true);
arw_setlocation(stTimeARW, date, time, high);
arw_setcolor(stTImeARW, yellow);
arw_setstyle(stTimeARW,3);
if time = EUenTime then
enTimeARW = arw_new(date, time, high, true);
arw_setlocation(enTimeARW, date, time, high);
arw_setcolor(enTImeARW, yellow);
arw_setstyle(enTimeARW,3);
if time = newsTime then
newsARW = arw_new(date, time, high, true);
arw_setlocation(newsARW, date, time, high);
arw_setcolor(newsARW, blue);
arw_setstyle(newsARW,3);
if time >= EUstTime and time <= EUenTime then
PlotPaintBar(high, low, open, close, "", yellow);
end;
if plotUStime = true then begin
if time >= USstTime and time <= USenTime then
PlotPaintBar(high, low, open, close, "", red);
end;
Please see image attached (I hope tssupport resolve the image colour issue on version 7).
There are 2 problems with, first the study plots an arrow on the last bar chart, and second although there's enough data on the first day on the historic chart, no arrow is being plotted on it.
Naturally that this 2 issues don't affect the results that I want to get from this study, but they are there, showing me that the study has a problem.
I was not able to plot the arrows like shown in the image using currentbar= 1.
How do you move the arrows into wherever you want on the chart using the currentbar?
Fernando