My System - My trades.

If we can have a line in price charts (something like a supertrend line) but with the logic of say green when price is above 36EMA and LVbar then we can have a complete system.
We take trades only when both price and OBV are in sync combining these 2 (price and OBV) charts. i.e. Long when both are green and short when both are red. Just exploring the possibility for automating.
Extermist Ji, please help I am unable to plot lines properly.
 

extremist

Well-Known Member
If we can have a line in price charts (something like a supertrend line) but with the logic of say green when price is above 36EMA and LVbar then we can have a complete system.
We take trades only when both price and OBV are in sync combining these 2 (price and OBV) charts. i.e. Long when both are green and short when both are red. Just exploring the possibility for automating.
VKSL line (Ver 1.00)




Code:
_SECTION_BEGIN("VKSLline V 1.00");

n=Day() != Ref(Day(), -1);

a=LowestSince(n,V);
hh=ValueWhen(V==a,H);
ll=ValueWhen(V==a,L);

hr = ValueWhen(V==a,Hour());
mn = ValueWhen(V==a,Minute());
e36 = EMA(C,36);

res=max(e36,hh);
sup=min(e36,ll);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);
col = IIf(avn==1,colorGreen,colorRed);

plot(tsl,"\nVKSL ",col,stylethick);

_SECTION_END();
Save this code to Custom folder and Drag drop that code on existing price chart.

As it is Ver 1.00 ...
some other versions may also come.

for now this is what i thought.
 
Last edited:
VKSL line (Ver 1.00)





Code:
_SECTION_BEGIN("VKSLline V 1.00");

n=Day() != Ref(Day(), -1);

a=[B]highestSince(n,V)[/B];
hh=ValueWhen(V==a,H);
ll=ValueWhen(V==a,L);

e36 = EMA(C,36);

res=max(e36,hh);
sup=min(e36,ll);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);
col = IIf(avn==1,colorGreen,colorRed);

plot(tsl,"\nVKSL ",col,stylethick);

_SECTION_END();
Save this code to Custom folder and Drag drop that code on existing price chart.

As it is Ver 1.00 ...
some other versions may also come.

for now this is what i thought.
Sir,
shouldnt it be lowestsince?
 
Extremist ji does this line change colour (repaint) in real time. If it does, then good. If take the OBV line colour as primary, then we look to go long when this line becomes green and vice versa for shorts. We wait to take a trade till both the lines are of the same colour. Is my logic right. Pls reply anybody and everybody including Extremist ji and MB ji.
 

Similar threads