Dear all,
I am using stochastic oscillator crossover system for trading. My parameter is Stsci value 39,1 and moving average 3(E).
Here I have created AFL :-
uptrend= (StochK(39,3)>StochD(39,1,3));
downtrend=(StochK(39,3)<StochD(39,1,3));
Buy = Cross(uptrend,downtrend);
PlotShapes( shapeUpArrow * Buy, colorGreen,0,L,-12);
Sell = Cross(downtrend,uptrend);
PlotShapes( shapeDownArrow * Sell, colorRed,0,H,-12);
Above this code will show Buy & Sell Signal When Stscill Cross Above or Below Level. But I want buy and sell signal in below condition.
BUY CONDITION :- WHEN MARKET IS IN UPTREND [StochK(39,3) >StochD(39,1,3)] WE FIND WHICH CANDLE FIRST BREAK HIGH + 5 POINTS COMPARE WITH PRE.CANDLE HIGH THEN WANT SHOW HERE BUY SIGNAL.
SELL CONDITION :- WHEN MARKET IS IN DOWNTREND [StochK(39,3) <StochD(39,1,3)] WE FIND WHICH CANDLE FIRST BREAK LOW - 5 POINTS COMPARE WITH PRE.CANDLE LOW THEN WANT SHOW HERE SELL SIGNAL.
Here I attached Nifty Chart for Example.
Explanation :-
In this Above Chart, First 5 Candle is green . That means Sto.osci. (39,1) is Above The Moving Average (3) Line. But 4th Candle only (First) Breake Pre.Candle High + 5 Points.
So Here I want to get Buy Signal .
AND 6th & 7th Candle is Red. This means Sto.osci. (39,1) is Below The Moving Average (3) Line. But 7th Red Candle didnt Breake Pre.Candle Low. So Here is Continuing Our Long Trade.
8th and 9th Candle is Green and 9th Candle High also breake Pre.Candle High + 5. But Here we dont Get Buy Signal. Because Already we have Long Position. So we should wait only for Sell signal.
10th Candle is Red But 11th Candel didnt Breake 10th Candle Low. 12,15,18th also the same. [Compare the 17th red Candle low with 16th Candle low = 10 Points. But Pre.Candle 16 is Green] . So here also Contiuing our Long Position.
19th,20th,21st is green Candle and 21st candle is breake Pre.Candle High + 5. Here also we dont get Buy Signal . Because Already we have Long Position.
22nd and 23rd is red and 23rd Candle Breake Pre.Candle Low + 5 . So Here I want to get Sell signal.
24th Candle is Green But 25th Candle Didnt Breake High + 5 Points.
25th & 26th is Red Candle .------> Market closed.
This Day Total Trade : 1 Lot Long & 1 Lot Short.
Kindly Help Me to Create Buy & Sell Signal in My Condition.
I am using stochastic oscillator crossover system for trading. My parameter is Stsci value 39,1 and moving average 3(E).
Here I have created AFL :-
uptrend= (StochK(39,3)>StochD(39,1,3));
downtrend=(StochK(39,3)<StochD(39,1,3));
Buy = Cross(uptrend,downtrend);
PlotShapes( shapeUpArrow * Buy, colorGreen,0,L,-12);
Sell = Cross(downtrend,uptrend);
PlotShapes( shapeDownArrow * Sell, colorRed,0,H,-12);
Above this code will show Buy & Sell Signal When Stscill Cross Above or Below Level. But I want buy and sell signal in below condition.
BUY CONDITION :- WHEN MARKET IS IN UPTREND [StochK(39,3) >StochD(39,1,3)] WE FIND WHICH CANDLE FIRST BREAK HIGH + 5 POINTS COMPARE WITH PRE.CANDLE HIGH THEN WANT SHOW HERE BUY SIGNAL.
SELL CONDITION :- WHEN MARKET IS IN DOWNTREND [StochK(39,3) <StochD(39,1,3)] WE FIND WHICH CANDLE FIRST BREAK LOW - 5 POINTS COMPARE WITH PRE.CANDLE LOW THEN WANT SHOW HERE SELL SIGNAL.
Here I attached Nifty Chart for Example.
Explanation :-
In this Above Chart, First 5 Candle is green . That means Sto.osci. (39,1) is Above The Moving Average (3) Line. But 4th Candle only (First) Breake Pre.Candle High + 5 Points.
So Here I want to get Buy Signal .
AND 6th & 7th Candle is Red. This means Sto.osci. (39,1) is Below The Moving Average (3) Line. But 7th Red Candle didnt Breake Pre.Candle Low. So Here is Continuing Our Long Trade.
8th and 9th Candle is Green and 9th Candle High also breake Pre.Candle High + 5. But Here we dont Get Buy Signal. Because Already we have Long Position. So we should wait only for Sell signal.
10th Candle is Red But 11th Candel didnt Breake 10th Candle Low. 12,15,18th also the same. [Compare the 17th red Candle low with 16th Candle low = 10 Points. But Pre.Candle 16 is Green] . So here also Contiuing our Long Position.
19th,20th,21st is green Candle and 21st candle is breake Pre.Candle High + 5. Here also we dont get Buy Signal . Because Already we have Long Position.
22nd and 23rd is red and 23rd Candle Breake Pre.Candle Low + 5 . So Here I want to get Sell signal.
24th Candle is Green But 25th Candle Didnt Breake High + 5 Points.
25th & 26th is Red Candle .------> Market closed.
This Day Total Trade : 1 Lot Long & 1 Lot Short.
Kindly Help Me to Create Buy & Sell Signal in My Condition.