Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 15:10:24 +0000



code

View Count: 631

[2017-03-16 17:21:08]
User713688 - Posts: 25
i have no idea how to code. can someone make this for me please?



input ShowDistArrows = yes;
input ShowCloud = no;
input UpThreshold = 1000;
input DownThreshold = -1000;
input DistArrowLevel = 1300;
input ShowHiLo = yes;

def Above = if close > UpThreshold then 1 else 0;
def Below = if close < DownThreshold then 1 else 0; plot pline; plot nline; pline = UpThreshold; nline = DownThreshold; pline.SetStyle(Curve.LONG_DASH); pline.SetDefaultColor(Color.RED); nline.SetStyle(Curve.LONG_DASH); nline.SetDefaultColor(Color.GREEN); Def cloudhigh = if ShowCloud then pline else Double.NaN; Def cloudlow = if ShowCloud then nline else Double.NaN; AddCloud (cloudhigh, cloudlow, Color.DARK_GRAY, Color.DARK_GRAY); AddLabel(ShowHiLo,“HI ”+AsText(high(“$TICK”, ”Day”, ”LAST”)), Color.ORANGE); AddLabel(ShowHiLo,“LO ”+AsText(low(“$TICK”, ”Day”, ”LAST”)), Color.ORANGE); AddLabel(close >= 0 and close <= UpThreshold,close+ " ”,Color.GREEN);
AddLabel(close < 0 and close >= DownThreshold,close+ " ”,Color.RED);
AddLabel(close > UpThreshold,"Above "+AsText(UpThreshold)+"! "+ close, Color.GREEN);
AddLabel(close < DownThreshold,"Below "+AsText(DownThreshold)+"! "+close, Color.RED);

#Distribution Function
def Less = If((close < 0), 1, 0); def Greater = If((close > 0), 1, 0);
def closeByPeriod = close(period = “DAY”)[-1];
def newDay = if !IsNaN(closeByPeriod) then 0 else 1;
plot DistributionUp;
plot DistributionDown;

if !IsNaN(close(period = “DAY”)[-1])
then {

DistributionUp = Double.NaN;
DistributionDown = Double.NaN;

} else {

DistributionUp = if newDay and ShowDistArrows and Greater then +DistArrowLevel else Double.NaN;
DistributionDown = if newDay and ShowDistArrows and Less then -DistArrowLevel else Double.NaN;
}

DistributionUp.SetStyle(Curve.POINTS);
DistributionUp.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
DistributionUp.SetDefaultColor(Color.GREEN);
DistributionUp.SetLineWeight(3);
DistributionDown.SetStyle(Curve.POINTS);
DistributionDown.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
DistributionDown.SetDefaultColor(Color.RED);
DistributionDown.SetLineWeight(3);

#ZeroLine
plot zeroline = 0;
zeroline.SetDefaultColor(Color.CYAN);
zeroline.SetStyle(Curve.LONG_DASH);
zeroline.HideTitle();
zeroline.HideBubble();
[2017-03-16 18:33:16]
Sierra Chart Engineering - Posts: 104368
We will have someone contact you about this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-03-17 06:45:05]
Edge Player Trading - Posts: 9
Sierra Charts has asked me to contact you regarding your request. Email me a brief description of what you are looking for: edgeplayer@edgeplayertrading.com

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account