Help - Search - Members - Calendar
Full Version: Inside Bar
Visual Trading Systems User Forums > VTTRADER INDICATORS > INDICATORS REQUESTS
Trader_9655
Hello,

I was wondering if you could make an indicator that alerts me when there is an inside bar. My definition of an inside bar is a bar that has the high and low less than or equal to the previous bar.

Thanks
cskidmore
Hello,

Alerts you in what form? It's likely this will have to be created as a very simple alert-only trading system. You could probably build this yourself; The code is quite easy.

InsideBar:= H<=ref(H,-1) AND L=>ref(L,-1);

Then, create " InsideBar " as an Output variable in the Output Bookmark w/ graphic enabled and alert enabled options checkmarked. Goto the Graphic and Alert Bookmarks and set their properties. Save the system and test.

Regards,
Chris
Beno72
Here is an indicator that displays the Inside and Outside Bars


Click to view attachment
ramrocket
Hi Chris,

I can use the code above.

Can you also give me the code for an outside bar

outside bar:
- the 1st bar's body is engulfed by the 2nd bar's body

1st bar is the candle to the left.

thanks



cskidmore
Hello,

OutsideBar:= H>=ref(H,-1) AND L<=ref(L,-1);

Regards,
Chris
AZ-Heat
Hi Chris,

Is there a way for this to show a signal when the lows or highs are the same
within a inside bar. Right now it only shows a signal when -1. I tried (H,-0) AND (L,-0)
and that did not work.

Thanks

AZ
cskidmore
Hello,

You'll need to add the additional condition of H=L (or High=Low). For example,

InsideBarEqualHighLow:= InsideBar AND H=L;

Regards,
Chris
g6cat
Hi Chris,

I am trying to have this Inside Bar Alert ONLY Trading system to just trigger alerts when an Inside BAR happens between a certain time frame. I am using it on hourly charts and when I add what I have done soo far the time filter is not working. For instance, I just attached it to charts and it was giving an alert and A: wasn't an inside bar and B: Was after time filter.

Could you adjust this code so it only sends off an alert if an Inside Bar occurs between 12:00 AM - 10:00 AM. I will be using it on Hourly Charts.

Thanks,
Matt
cskidmore
Hi Matt,

I've added your request to my "to do" list.

Regards,
Chris
g6cat
Thank You Chirs.

I already had added the Time Filter settings to the code but its just not working correctly. (That much less you have to do)
cskidmore
Hello,

I took a look at your system. Since you'd already included basically everything, I went ahead and fixed it for you since it took only about 2 minutes. You were very close. The reason the trading session wasn't working is because you had the "Yes" and "No" enumeration values in the wrong order (based on the way those values are referenced in the code). I flipped them around for you. When using enumeration lists, the list is not referenced by the value you type, but rather by the numerical position of the item in the selection list (i.e. the first item has a value of "0", the second item has value of "1", etc.). I also positioned the "Inside bar" code below the "Trading Session" code and added the "trading session" condition to its logic.

Regards,
Chris
g6cat
Awesome!

I always try to do the coding, but for whatever reason I always over look something. I Honestly can say YOU are the reason that kept me trading with Vt Trader. Along with the customability and the wonderful all around trading platform.
cskidmore
Thank you for the kind words. I try my best. We have some great teams of people that contribute to VT Trader 2.0's success.

Regards,
Chris
g6cat
Oh no, I tried using this last night and whenever a new bar opens it FITs the coding as an inside bar and the alarms and whistles start chirping away. Something I overlooked when asking for the alert.

Is there a way to make the alert only sound when the CLOSE of the candle = inside bar ?

Thanks,
Matt
cskidmore
Hello,

Unfortunately, no. However, that's a feature I'd like to add in the future. Alerts are currently triggered intrabar with each incoming price tick and there's no way to change that behavior. I could delay the alert until the bar closed, but then the alert would be active with each incoming price tick for the entire duration of the following bar.

Regards,
Chris
g6cat
QUOTE(cskidmore @ Jul 9 2009, 10:08 AM) *

Hello,

Unfortunately, no. However, that's a feature I'd like to add in the future. Alerts are currently triggered intrabar with each incoming price tick and there's no way to change that behavior. I could delay the alert until the bar closed, but then the alert would be active with each incoming price tick for the entire duration of the following bar.

Regards,
Chris


I'd prefer that over the current alert. So the DELAY until the bar closed is what I need.
cskidmore
Hello,

Your modified alert system is attached.

Regards,
Chris
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.