Username or Email
Password
Forgot
New User Signup (free)
Browse
Register
Downloads / Indicators
Trading Webinars
Articles
Upgrade to Elite
Unanswered Posts
My Posts
Return to Homepage
Today's Posts
Trading Reviews and Vendors
Futures Brokers Reviews
Traders Hideout (general)
Platforms and Indicators
Trading Journals
Elite Trading Journals
Psychology and Money Management
Off-Topic
The Elite Circle
Trading Articles
Main Trading Articles Index
Article Categories
Help, Tutorials, How-To's
Traders and Trading Methods
Platforms, Tools and Indicators
Terms (Glossary)
Article Tools
List New Articles
List Recent Article Changes
Random Article
Most Popular Articles
Category Groupings
Wanted Articles
Most Linked to from Forum
Go to Page...
Quotes
by TradingView
futures io
>
Downloads
>
MultiCharts
>
DMI change bar color
Categories
Show
Search
Help
Search
title and description
keywords
Advanced Search
Winning nominations
What's Hot
What's New
New Ratings
Some Random Entries
Home Category
Up a Level
MultiCharts
MultiCharts Downloads / MultiCharts Indicators
Share
MultiCharts
indicators, EasyLanguage indicators.
Filter
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
0
1
2
3
4
5
6
7
8
9
Entries
Login to Download
DMI change bar color
I want to change the ID code to change color when there is current bar cross between DM + DM uphill (blue) and down (red). The other bars are still black. View Source (not working)
using System.Drawing;
using PowerLanguage.Function;
namespace PowerLanguage.Indicator
{
public class DMI_joa : IndicatorObject
{
private DirMovement m_dirmovement1;
private IPlotObject Plot1;
private IPlotObject Plot2;
private IPlotObject Plot3;
public DMI_joa(object ctx) :
base(ctx){
adxtrend = 25;
length = 8;
}
[Input]
public int length { get; set; }
[Input]
public double adxtrend { get; set; }
[Input]
public Color UpbarColour { get; set; }
[Input]
public Color DownBarColour { get; set; }
private IPlotObject plotOpen, plotHigh, plotLow, plotClose;
protected override void Create(){
m_dirmovement1 = new DirMovement(this);
Plot1 =
AddPlot(new PlotAttributes("DMI+", 0, Color.Blue,
Color.Empty, 0, 0, true));
Plot2 =
AddPlot(new PlotAttributes("DMI-", 0, Color.Red,
Color.Empty,
0, 0, true));
Plot3 =
AddPlot(new PlotAttributes("ADX", 0, Color.Cyan,
Color.Empty, 0, 0, false));
// Initialize the IPlotObjects
plotHigh = AddPlot(new PlotAttributes("High",
EPlotShapes.BarHigh, Color.Black));
plotLow = AddPlot(new PlotAttributes("Low",
EPlotShapes.BarLow, Color.Black));
plotOpen = AddPlot(new PlotAttributes("Open",
EPlotShapes.LeftTick, Color.Black));
plotClose = AddPlot(new PlotAttributes("Close",
EPlotShapes.RightTick, Color.Black));
// Default values for the inputs
UpbarColour = Color.Green;
DownBarColour = Color.Red;
}
protected override void StartCalc(){
m_dirmovement1.PriceH = Bars.High;
m_dirmovement1.PriceL = Bars.Low;
m_dirmovement1.PriceC = Bars.Close;
m_dirmovement1.Length = length;
}
protected override void CalcBar(){
m_dirmovement1.Call();
Plot1.Set(0, m_dirmovement1.DMIPlus.Value);
Plot2.Set(0, m_dirmovement1.DMIMinus.Value);
Plot3.Set(0, m_dirmovement1.ADX.Value);
if (PublicFunctions.DoubleGreater(m_dirmovement1.ADX.Value, adxtrend))
{
if (this.CrossesOver(m_dirmovement1.DMIPlus, m_dirmovement1.DMIMinus))
{
Alerts.Alert("Bullish alert");
// plotOpen.Set(Bars.Open[0], UpbarColour);
// plotHigh.Set(Bars.High[0], UpbarColour);
// plotLow.Set(Bars.Low[0], UpbarColour);
// plotClose.Set(Bars.Close[0], UpbarColour);
}
else{
if (this.CrossesUnder(m_dirmovement1.DMIPlus, m_dirmovement1.DMIMinus))
{
Alerts.Alert("Bearish alert");
// plotOpen.Set(Bars.Open[0], DownBarColour);
// plotHigh.Set(Bars.High[0], DownBarColour);
// plotLow.Set(Bars.Low[0], DownBarColour);
// plotClose.Set(Bars.Close[0], DownBarColour);
}
}
}
}
}
}
I tried to SetPlotColor and PlotPaintBar and do not get
By the way I use multicharts.net
Can you help me? Thank you
Category
MultiCharts
Details:
DMI change bar color
Category:
MultiCharts
November 16th, 2015
Size: 14.72 KB
Downloaded: 90 times
1681
jonxab
View Download Details
February 13th, 2017 06:51 AM
eval02
Category
The Elite Circle
NinjaTrader
- NinjaTrader 8 Indicators and More
- NinjaTrader 6.5 Indicators
- NinjaTrader 7 Indicators
- NinjaTrader 6.5 Strategies
- NinjaTrader 7 Strategies
- NinjaTrader 6.5 Templates
- NinjaTrader 7 Templates
- NinjaTrader 6.5 Miscellaneous
- NinjaTrader 7 Miscellaneous
MetaTrader
- MetaTrader 4 Indicators
- MetaTrader 5 Indicators
TradeStation
MultiCharts
ThinkOrSwim
Sierra Chart
FXCM Strategy Trader
Matlab Functions
Educational
Free Section
True Edge Awards / Best Products
Trading Webinars How-to's
Trading Reviews & Products
Futures Broker Reviews
NinjaTrader Brokerage (Broker)
NinjaTrader Indicators to Download
Kinetick (Data Feed Provider)
IQFeed (Data Feed Provider)
Bookmap (Trading Software)
NinjaTrader (Trading Platform)
Topstep (Prop Trading)
SharkIndicators (Trading Software)
Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us
-
Contact Us
-
Site Rules, Acceptable Use, and Terms and Conditions
-
Privacy Policy
-
Downloads
-
Top