Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I'm using @Fat Tails SuperTrend and Keltner for indicators.
I'm currently using something like this for background color:
// Long
if SuperTrend.UpTrend && Fast > Slow && Slow (rising)
{
BackGround Color UpColor
}
// Short is opposite and Neutral is everything else.
I had a breakthrough earlier this week when @Fat Tails showed me how to get SuperTrend simplified to STU=anaSuperTrend.etc,etc. Now I'm thinking conditions I have for background colors could trigger signals.
I'm hoping for something like-
LONG=SuperTrend.UpTrend && Fast > Slow && Slow (rising)
// Long
if LONG [1] = false && LONG [0]=true
{
LONG Signal
}
I'm willing to do my own fishing if someone can send me to the place.
Thanks in advance.
Difference between discomfort and pain = 1 tick
Can you help answer these questions from other members on NexusFi?
BackColor = Color.FromArgb(opacity, Color.Blue); (ex: Long - Blue / Short - Red, or any other colors you prefer)
In the Variables section, insert code:
private int opacity = 100; (this allows you to control the opacity of the color; 10%, 20%, etc up to 100%)
In the Properties section, insert code:
[Description("Background opacity")]
[GridCategory("Parameters")]
public int Opacity
{
get { return opacity; }
set { opacity = (value); }
}
This defines the field called "opacity", which will pop up in the indicator preferences panel and allow you to specify the opacity percentage (10, 20, up to 100%)
Hope that helps.
After all, it's what you learn AFTER you know it all, that counts!
I'd have to see the indicator you're talking about. Post it here, or send it to me in a Private Message and I'll take a look to see where to insert the code. There are plenty of indicators out there that generate trade signals. The question is - are they good signals?
After all, it's what you learn AFTER you know it all, that counts!
Thanks in advance for taking your time to look at this.
First a disclaimer: This is more of a learning experience to improve my coding ability than me being set on a signal.
What i'm curious about... I would like to use the code in //ColorBars to create a signal like I have in //Long SetUp. My thinking is to create something like:
LONG =if (EMA(8)[0]> SMA (20)[0]&& STU.UpTrend [0]&& KU.Trend [0]> 0 )
and then i could use something like--
if LONG [1] == false && LONG [0]==true
{
DrawArrow/ or enter market or something!!
}
I don't know if what I'm asking is possible...but my limited knowledge has me thinking it would simplify/optimize signals and entries.
It looks like you're on the right track. I don't see anything wrong with the code. You just need to decide what it is you want to do, and under what conditions you want to do it.
After all, it's what you learn AFTER you know it all, that counts!
What i would like to do is:
if (EMA(8)[0]> SMA (20)[0] && STU.UpTrend [0]&& KU.Trend [0]> 0 )
{
DrawArrowUp("arrow"+CurrentBar, true, 0, Open[0]-arrowOffset*TickSize, arrowColorUp);
}
But I don't get 1 arrow up (like a signal) I get an arrow every bar as long as the condition holds. That's the reason I'm using colorbars. I'm trying to get 1 arrow/signal when the conditions becomes true for long and 1 arrow/signal when the condition is short.
Look at it as a "switch" If the light in the room is already on, then don't turn the lightswitch on again. If the light is off, then it's ok to turn the lightswitch on. In your case, your code is telling the indicator to draw the arrow - every time - so long as the condition remains true. You only want to draw it ONCE, so long as the condition remains true - until the condition changes.
Set them both to FALSE in the variables section. We're assuming that both the up and down condition do not exist, to begin with, then add (bolded for emphasis):
Each "cycle" thru the code, it will check & see if the (up or down) arrow has already been drawn. If uparrowdrawn / downarrowdrawn is already true, then it won't execute the DrawArrow code again.
Using the Low[0]-arrowoffset*Ticksize (for the up arrow) and High[0]+arrowoffset*Ticksize (for the down arrow) will displace the drawing of the arrow below the low of the bar, or above the high of the bar, so that the arrow won't be covered by the price bar itself, as it probably would be using Open[0] and Close[0]
Try that & see if it gives you what you want.
p.s. I'm sure there's a more sophisticated way of handling this, but this is the method I've used for years, and it works fine. I'm just a self-trained cut & paste coder myself!
After all, it's what you learn AFTER you know it all, that counts!
Thanks. I'll check it out and let you know.
p.s. I use the Open [0] -arrowoffset*Ticksize with if(FirstTickOfBar) to determine risk. I wait on a pullback if ArrowUp is above my stop position... enter market if ArrowUp is below my stop position.