Convert Think or Swim to Pine Script for TradingView

Other Design

Trabalho concluído

Tempo de execução 2 horas
Comentário do desenvolvedor
Thanks for the job
Comentário do cliente
Brilliant! Excellent coder!

Termos de Referência

# Settings
input MACD = yes;
input BollingerBands = yes;
input OldSignal = no;
input SupplyDemand = no;
input Labels = yes;
input limit_cloud = no;
input cloud_length = 10;


# Bollinger Bands
input displace = 0;
input lengthBB = 20;
input Num_Dev_Dn = -2.0;
input Num_Dev_up = 2.0;
input averageTypeBB = AverageType.Simple;
input price = close;
def oAtfh6n = stdev(data = price[-displace], length = lengthBB);
def aM5xu7k = MovingAverage(averageTypeBB, data = price[-displace], length = lengthBB);
def dI2hs07 = aM5xu7k + num_Dev_Dn * oAtfh6n;
def cCdm4cd = aM5xu7k + num_Dev_Up * oAtfh6n;
def gD4q0z5 = price crosses above dI2hs07;
def jRvqeoe = price crosses below cCdm4cd;


# RSI
input length = 14;
input over_Bought = 70;
input over_Sold = 30;
input over_Bought2 = 65;
input over_Sold2 = 35;
input averageType = AverageType.WILDERS;
def vTx3j8c = MovingAverage(averageType, price - price[1], length);
def gIl5r7s = MovingAverage(averageType, AbsValue(price - price[1]), length);
def tA4qhjg = if gIl5r7s != 0 then vTx3j8c / gIl5r7s else 0;
def RSI = 50 * (tA4qhjg + 1);
def mFzzstv = over_Sold;
def pKmsxdf = over_Bought;
# End RSI


# MACD
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input MACDaverageType = AverageType.EXPONENTIAL;
def bZrnvi0 = MovingAverage(MACDaverageType, close + (close - close[(fastlength - 1) / 2]), fastLength) - MovingAverage(MACDaverageType, close + (close - close[(slowLength - 1) / 2]), slowLength);
def cOxk8kt = MovingAverage(MACDaverageType, bZrnvi0, MACDLength);
def pF6uf3l = bZrnvi0 - cOxk8kt;
def dFgleep = pF6uf3l crosses above 0;
def vMss0gi = pF6uf3l crosses below 0;
# END MACD


# Moving Average
input priceMA = close;
input lengthMA = 5;
input showBreakoutSignals = yes;
def mSng78b = Average(priceMA[-displace], lengthMA);
def uTev1a2 = priceMA crosses above mSng78b;
def rPy3y4n = priceMA crosses below mSng78b;


# Old Signals
def mGu36uc = RSI(length = length, averageType = averageType) < over_Sold2 and uTev1a2;
def jEhoesi = RSI(length = length, averageType = averageType) > over_Bought2 and rPy3y4n;


# BB Signals
def lK8vc4f = RSI(length = length, averageType = averageType) < over_Sold and gD4q0z5;
def bKxom7g = RSI(length = length, averageType = averageType) > over_Bought and jRvqeoe;


# MCD Signals
def gA43ixk = RSI(length = length, averageType = averageType) < over_Sold2 and dFgleep;
def wFgpycr = RSI(length = length, averageType = averageType) > over_Bought2 and vMss0gi;


# Plot Signals
plot bullish_bb = if BollingerBands then lK8vc4f else double.nan;
bullish_bb.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
bullish_bb.SetDefaultColor(Color.CYAN);
bullish_bb.SetLineWeight(2);
plot bearish_bb = if BollingerBands then bKxom7g else double.nan;
bearish_bb.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
bearish_bb.SetDefaultColor(Color.CYAN);
bearish_bb.SetLineWeight(2);


# Cont.
plot bullish_mcd = if MACD then gA43ixk else double.nan;
bullish_mcd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
bullish_mcd.SetDefaultColor(Color.MAGENTA);
bullish_mcd.SetLineWeight(2);
plot bearish_mcd = if MACD then wFgpycr else double.nan;
bearish_mcd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
bearish_mcd.SetDefaultColor(Color.MAGENTA);
bearish_mcd.SetLineWeight(2);


# Cont. #2
plot lZ15z9i = if OldSignal and mGu36uc then mGu36uc else double.nan;
lZ15z9i.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
lZ15z9i.SetDefaultColor(Color.WHITE);
lZ15z9i.SetLineWeight(1);
plot fMqt6x4 = if OldSignal and jEhoesi then jEhoesi else double.nan;
fMqt6x4.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
fMqt6x4.SetDefaultColor(Color.WHITE);
fMqt6x4.SetLineWeight(1);


# Supply and Demand Zone #1
def dHwh1h2 = if lK8vc4f or bKxom7g then 1 else 0;
def tCa2kqh = if dHwh1h2 then high else tCa2kqh[1];
def zVtogal = if dHwh1h2 then low else zVtogal[1];
def kZuxbiv = if dHwh1h2 then 1 else kZuxbiv[1] + 1;
plot fP699b2 = if SupplyDemand and limit_cloud == no or limit_cloud == yes and kZuxbiv <= cloud_length then tCa2kqh
else Double.NaN;
plot kUce1w6 = if SupplyDemand and limit_cloud == no or limit_cloud == yes and kZuxbiv <= cloud_length then zVtogal
else Double.NaN;
fP699b2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
kUce1w6.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
fP699b2.SetDefaultColor(Color.GRAY);
kUce1w6.SetDefaultColor(Color.GRAY);
addCloud(if SupplyDemand == yes then kUce1w6 else double.nan, kUce1w6, Color.CYAN, Color.CYAN);
addCloud(if SupplyDemand == yes then kUce1w6 else double.nan, fP699b2, Color.CYAN, Color.CYAN);


# Supply and Demand Zone #2
def qQibh70 = if gA43ixk or wFgpycr then 1 else 0;
def kE0y5jh = if qQibh70 then high else kE0y5jh[1];
def mCgv0ps = if qQibh70 then low else mCgv0ps[1];
def aAe6e6d = if qQibh70 then 1 else aAe6e6d[1] + 1;
plot qXv3kyo = if SupplyDemand and limit_cloud == no or limit_cloud == yes and aAe6e6d <= cloud_length then kE0y5jh
else Double.NaN;
plot kJilo78 = if SupplyDemand and limit_cloud == no or limit_cloud == yes and aAe6e6d <= cloud_length then mCgv0ps
else Double.NaN;
qXv3kyo.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
kJilo78.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
qXv3kyo.SetDefaultColor(Color.GRAY);
kJilo78.SetDefaultColor(Color.GRAY);
addCloud(if SupplyDemand == yes then kJilo78 else double.nan, kJilo78, Color.MAGENTA, Color.MAGENTA);
addCloud(if SupplyDemand == yes then kJilo78 else double.nan, qXv3kyo, Color.MAGENTA, Color.MAGENTA);


AddLabel(Labels and yes, "Advanced Market Moves", color.Yellow);
AddLabel(Labels and yes, "Signal 1", color.CYAN);
AddLabel(Labels and yes, "Signal 2", color.MAGENTA);


Respondido

1
Desenvolvedor 1
Classificação
(38)
Projetos
50
10%
Arbitragem
1
0% / 0%
Expirado
8
16%
Livre
2
Desenvolvedor 2
Classificação
(94)
Projetos
190
66%
Arbitragem
8
25% / 50%
Expirado
2
1%
Livre
3
Desenvolvedor 3
Classificação
(10)
Projetos
13
8%
Arbitragem
3
67% / 33%
Expirado
0
Livre
4
Desenvolvedor 4
Classificação
(236)
Projetos
265
64%
Arbitragem
6
17% / 33%
Expirado
8
3%
Carregado
Pedidos semelhantes
Hi there ,I am seeking for some who can I integrate MT4+MT5 into Matlab!We need our indicator window of MT4+MT5 viewable in Matlab so we can execute more research on Matlab Best regards Richie
The basic indicator and the only indicator to be used is PRICE PERCENT RANGE and the indicator files are attached. A picture to visualize what is required is also attached. Job: Indicator : 1. Add Buy alert and Buy arrow function,if the price%R value touches or goes below value 9.5 or the user specified,after candle close. 2. Add Sell alert and Sell arrow function,if the price%R value touches or goes below value 90.5
READ THE ENTIRE DESCRIPTION FIRST - THIS IS MY 3RD ATTEMPT AT TRYING TO FIND SOMEONE WHO CAN ACTUALLY COMPLETE THE TASK. This project is the creation of an EA that will assist in setting up a BUY/SELL STOP trade when when the price action on the chart would normally not allow for such a trade to be placed. The problem: If price action is not already extended beyond the desired BUY/SELL stop level, a placement of a

Informações sobre o projeto

Orçamento
45+ USD
Desenvolvedor
40.5 USD
Prazo
para 5 dias