Simple Coding Help - No Promise.

@bbhanushali

Very interesting to know about your coding capabilities. I've been trying to code as per the attached image but failed. Is there a way to code it successfully?
Seems simple enough

In your RM = D*F/E
I guess E & F is Number of Points
and D & RM is Number of bars . . .

Once you have identified your points (swing pivots),
you can then re-loop for your calculation . . .


Happy :)
 
@JediStar: If you specifically want then you set the last chart window time frame to 5min and every time you double click on exploration windows "Ticker", you see chart of 5min time frame for that "Ticker".
@JediStar: If you specifically want then you set the last chart window time frame to 5min and every time you double click on exploration windows "Ticker", you see chart of 5min time frame for that "Ticker".

Interestingly I dont see this option under exploration, can you clarify where I configure this one. Just so that I am clear, I am looking at exploration in different TF and the sync on chart TF for a different TF, and in this case, 15 mins and 5 mins respectively.

Thanks mate.

~ JS
 
Interestingly I dont see this option under exploration, can you clarify where I configure this one. Just so that I am clear, I am looking at exploration in different TF and the sync on chart TF for a different TF, and in this case, 15 mins and 5 mins respectively.

Thanks mate.

~ JS
@JediStar: In chart window open new chart "+" put whatever studies you want there and whatever time frame you want there and select any ticker name. Now, this new chart has all those things that you want to see in "Ticker" analysis! Come to Analysis/Exploration window double click any "Ticker" that you see and the "Ticker" name in chart window will change auto, this you can do to as many ticker's that you want and this chart will keep changing ticker names as you double click them in exploration window.
 
Hi there,

I am looking out for a code with SL and TGTs to reflect on intraday chart.

Please find below condition:

Entry Price = 5Day EMA.

Stop loss = 35 points. It should remain for T+2 days (e.g if Entry Price is 10000 then long SL is 10000-35=9965 and short SL is 10000+35=10035).

Targets = should be from entry price
TGT 1 -1%
TGT2 - 1.5%
TGT3 - 2%
TGT4 - 2.5%
TGT5 - 3%
e.g.
For long
TGT1 - 10000+100 =10100
TGT2 - 10000+150=10150
TGT3 - 10000+200=10200
TGT4 - 10000+250=10250
TGT5 - 10000+300 = 10300

For Short
TGT1 - 10000-100 =9900
TGT2 - 10000-150=9850
TGT3 - 10000-200=9800
TGT4 - 10000-250=9750
TGT5 - 10000-300 = 9700

Kindly let me know in case need any more information.
Humble request to help
 
Humble request to help
@tangotaurian: Hope it helps you. Thanks.

Code:
_SECTION_BEGIN("Buy Sell Level Plots");

//===================Change below conditions to match yours ======================
Buy = Cross(EMA(C,5), C);
Short = Cross(C, EMA(C,5));
//================= Change the above conditions to match yours ================
Buy = ExRem(Buy,Short);
Short = ExRem(Short,Buy);

PlotShapes(Buy*shapeUpArrow,colorGreen,0,L,-25);
PlotShapes(Short*shapedownarrow,colorred,0,H,-25);


SLLimit = Param("SL Abs Points",35,1,100,1);
TP1 = Param("TGT1 Range %",1,0.5,5,0.25);//min is 0.5% and max is 5% with increaments of 0.25%
TP2 = Param("TGT2 Range %",1.5,0.5,5,0.25);//min is 0.5% and max is 5% with increaments of 0.25%
TP3 = Param("TGT3 Range %",2,0.5,5,0.25);//min is 0.5% and max is 5% with increaments of 0.25%
TP4 = Param("TGT4 Range %",2.5,0.5,5,0.25);//min is 0.5% and max is 5% with increaments of 0.25%
TP5 = Param("TGT5 Range %",3,0.5,5,0.25);//min is 0.5% and max is 5% with increaments of 0.25%

ShowBuySell = ParamToggle("Show Buy Sell Levels","Yes|No",1);

entry=0;
sig = Null;
sl = Null;
tar1 = 0;
tar2 = 0;
tar3 = 0;
tar4 = 0;
tar5 = 0;
bars = Null;
Clr = Null;


for(i=BarCount-1;i>1;i--)

{if((Buy[i] == 1) )
{
entry = C[i];
sig = "BUY";
BuyPrice = ValueWhen(entry, C[i]);
BuyPrice = ceil(BuyPrice*20)/20;

sl = BuyPrice-SLlimit;
sl = floor(sl*20)/20;
tar1 = BuyPrice+((entry*TP1)/100);
tar1 = floor(tar1*20)/20;
tar2 = BuyPrice+((entry*TP2)/100);
tar2 = floor(tar2*20)/20;
tar3 = BuyPrice+((entry*TP3)/100);
tar3 = floor(tar3*20)/20;
tar4 = BuyPrice+((entry*TP4)/100);
tar4 = floor(tar4*20)/20;
tar5 = BuyPrice+((entry*TP5)/100);
tar5 = floor(tar5*20)/20;

Clr = colorLime;
TxtClr = colorBlue;
Tgt1Clr = colorLightBlue;
Tgt2Clr = colorGreen;
Tgt3Clr = colorAqua;
Tgt4Clr = colorTurquoise;
Tgt5Clr = colorbluegrey;
bars = i;
i = 0;
}

if((Short[i] == 1))
{
sig = "SELL";
entry = C[i];
SellPrice = ValueWhen(entry, C[i]);
SellPrice = floor(SellPrice*20)/20;

sl = SellPrice+sllimit;
sl = ceil(sl*20)/20;
tar1 = SellPrice-((entry*TP1)/100);
tar1 = ceil(tar1*20)/20;
tar2 = SellPrice-((entry*TP2)/100);
tar2 = ceil(tar2*20)/20;
tar3 = SellPrice-((entry*TP3)/100);
tar3 = ceil(tar3*20)/20;
tar4 = SellPrice-((entry*TP4)/100);
tar4 = ceil(tar4*20)/20;
tar5 = SellPrice-((entry*TP5)/100);
tar5 = ceil(tar5*20)/20;

Clr = colorRed;
TxtClr = colorOrange;
Tgt1Clr = colorViolet;
Tgt2Clr = colorRed;
Tgt3Clr = colorplum;
Tgt4Clr = colorgrey40;
Tgt5Clr = colorcustom12;
bars = i;
i = 0;
}}


Offset = 5;

ssl = IIf(bars == BarCount-1, sl[BarCount-1], Ref(sl, -1));
sl = ssl[BarCount-1];
tar1=tar1[BarCount-1];
tar2=tar2[BarCount-1];
tar3=tar3[BarCount-1];
tar4=tar4[BarCount-1];
tar5=tar5[BarCount-1];



if(ShowBuySell)
{
Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "Entry", Clr, styledashed|styleNoTitle|stylenolabel, Null, Null, Offset);
Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "S/L", Clr, styledashed|styleNoTitle|stylenolabel, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "Trgt1", Clr, styledashed|styleNoTitle|stylenolabel, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "Trgt2", Clr, styledashed|styleNoTitle|stylenolabel, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "Trgt3", Clr, styledashed|styleNoTitle|stylenolabel, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar4, BarCount, tar4,1), "Trgt4", Clr, styledashed|styleNoTitle|stylenolabel, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar5, BarCount, tar5,1), "Trgt2", Clr, styledashed|styleNoTitle|stylenolabel, Null, Null, Offset);

for (i=bars; i <BarCount;i++)
{
PlotText(""+sig+"@"+Writeval(entry,1.2), BarCount+2,entry,Null,TxtClr);
PlotText("SL@"+WriteVal(sl,1.2), BarCount+2,sl,Null,ColorDarkYellow);
PlotText("T1@"+WriteVal(tar1,1.2), BarCount+2,tar1,Null,Tgt1Clr);
PlotText("T2@"+WriteVal(tar2,1.2), BarCount+2,tar2,Null,Tgt2Clr);
PlotText("T3@"+WriteVal(tar3,1.2), BarCount+2,tar3,Null,Tgt3Clr);
PlotText("T4@"+WriteVal(tar4,1.2), BarCount+2,tar4,Null,Tgt4Clr);
PlotText("T5@"+WriteVal(tar5,1.2), BarCount+2,tar5,Null,Tgt5Clr);
}
}

_SECTION_END();
 
@JediStar: In chart window open new chart "+" put whatever studies you want there and whatever time frame you want there and select any ticker name. Now, this new chart has all those things that you want to see in "Ticker" analysis! Come to Analysis/Exploration window double click any "Ticker" that you see and the "Ticker" name in chart window will change auto, this you can do to as many ticker's that you want and this chart will keep changing ticker names as you double click them in exploration window.

Mate, I guess you got it wrong.

Let me explain with an example, as I cannot provide screenshot for this concept.

Exploration set to 15 Min TF : Ajantapharm given a Sell signal (Remember I am scanning using 15 Min TF)
I click on this ticker (Ajantapharm) --> Sync on chart is on --> So chart opens in 15 Min TF for Ajantapharm. Now I understand this is standard.

But what I am looking for is when I click on this ticker Ajantapharm (which was a result of a 15 min scan/exploration), I want it to open 5 Minute Chart (not 15 min).

Sorry about the confusion, if any, caused from my end.

Cheers
JS
 
Mate, I guess you got it wrong.

Let me explain with an example, as I cannot provide screenshot for this concept.

Exploration set to 15 Min TF : Ajantapharm given a Sell signal (Remember I am scanning using 15 Min TF)
I click on this ticker (Ajantapharm) --> Sync on chart is on --> So chart opens in 15 Min TF for Ajantapharm. Now I understand this is standard.

But what I am looking for is when I click on this ticker Ajantapharm (which was a result of a 15 min scan/exploration), I want it to open 5 Minute Chart (not 15 min).

Sorry about the confusion, if any, caused from my end.

Cheers
JS
@JediStar: I may be wrong, try removing Sync on chart and see. Thanks.
 

Similar threads