AFL help needed to plot lines

mechtrader

Well-Known Member
#91
Hi Edward,

The problem you mentioned is that of slippage. I cant think of anything to solve this. Brainstormed alot.
Plz enlighten us with some. This will give us a lead to ponder in that direction.

Thanks,
MT
 

dell

Well-Known Member
#92
@casoni and @edward ,
can u plz add lines in code for getting multitimeframe pivot lines in it .
like on 5 min chart , we can get pivot lines of 5m ,15m ,60m and of daily .
idea is here , trade the confluence area of multi tf pivot lines with candle low as stop or by using a trailing stoploss .
 

casoni

Well-Known Member
#93
@casoni and @edward ,
can u plz add lines in code for getting multitimeframe pivot lines in it .
like on 5 min chart , we can get pivot lines of 5m ,15m ,60m and of daily .
idea is here , trade the confluence area of multi tf pivot lines with candle low as stop or by using a trailing stoploss .
Actually i am bit confused , you want multitimeframe pivot lines of

PEAKS/BOTTOMS

or Rergular pivot point Levels

i.e PP,R1,S1,R2,S2 ....
 
#94
Hi Edward,

The problem you mentioned is that of slippage. I cant think of anything to solve this. Brainstormed alot.
Plz enlighten us with some. This will give us a lead to ponder in that direction.

Thanks,
MT


hi Mechtrader,

One thing I tried is when entering a trade you take the signals as shown in the chart as a BuySetup or a ShortSetup but wait for the price to drop below (for a buy) or above (for a short) a certain threshold of say 2 ticks. Then you are certain you will enter at that price without slippage at a small pullback. You can allow to wait for the price to pullback for a fixed number of bars, say 3 bars and if you do not get the trade then do not take it and skip that one instead. When exiting the you use a 2 tick slippage.

For a few years of 1-minute data this appears not to be successful.

Then I also tried waiting for a pullback for for instance 3 bars and when you do not get into the trade take the trade at the next bar (the forth bar in this example) for the open price of the bar. So you take all trades, some at a pullback, and some you force after a set number of bars after the buy/short setup, at the open. Again for the exit you allow for a slippage of 2 ticks.

This also does not give positive results for a longer period of time, unfortunately.

So the code I posted (especially when using the mini pivot stops) is profitable but you need your own skill maybe to pick out the winner trades I guess. Since when you take all trades the few ticks you have to pay extra for some trades will kill it.
 
#95
@casoni and @edward ,
can u plz add lines in code for getting multitimeframe pivot lines in it .
like on 5 min chart , we can get pivot lines of 5m ,15m ,60m and of daily .
idea is here , trade the confluence area of multi tf pivot lines with candle low as stop or by using a trailing stoploss .
the major pivots use multiple timeframes already. You can chose the number of minutes you wish for the timeframe using the parameter window. If this is not what you mean then please explain in more detail.
 

dell

Well-Known Member
#96
Actually i am bit confused , you want multitimeframe pivot lines of

PEAKS/BOTTOMS

or Rergular pivot point Levels

i.e PP,R1,S1,R2,S2 ....
the major pivots use multiple timeframes already. You can chose the number of minutes you wish for the timeframe using the parameter window. If this is not what you mean then please explain in more detail.
sir , actually we can plot only one multi tf pivot line using current formula ,
i mean to say that if 15m , hourly and daily also can be plotted along with regular 5m tf , than a great help .
all tf's pivot line(peaks,bottom's) plotted in 5m tf .
here , intention is to trade the major confluence line , where multiple tf's pivot line are at same point .
 

mechtrader

Well-Known Member
#97
hi Mechtrader,

One thing I tried is when entering a trade you take the signals as shown in the chart as a BuySetup or a ShortSetup but wait for the price to drop below (for a buy) or above (for a short) a certain threshold of say 2 ticks. Then you are certain you will enter at that price without slippage at a small pullback. You can allow to wait for the price to pullback for a fixed number of bars, say 3 bars and if you do not get the trade then do not take it and skip that one instead. When exiting the you use a 2 tick slippage.

For a few years of 1-minute data this appears not to be successful.

Then I also tried waiting for a pullback for for instance 3 bars and when you do not get into the trade take the trade at the next bar (the forth bar in this example) for the open price of the bar. So you take all trades, some at a pullback, and some you force after a set number of bars after the buy/short setup, at the open. Again for the exit you allow for a slippage of 2 ticks.

This also does not give positive results for a longer period of time, unfortunately.

So the code I posted (especially when using the mini pivot stops) is profitable but you need your own skill maybe to pick out the winner trades I guess. Since when you take all trades the few ticks you have to pay extra for some trades will kill it.
Hi Edward,
Thanks for the post.

Even when I was testing my system I tried everything possible to remove slippage (some being as you mentioned above).
But the reality is that you have to deal with this menace.
The only thing which I find helpful is:

1. First test the baseline system, deducting the commissions (not deducting slippage).
2. I tend to reduce trades as much as i can and also increase the avg profit/ trade at the same time.
3. Now we have a system which has good avg profit/trade, takes a few trades, but the problem is breakout system generate huge orderflow and hence slippage. So I decide to enter at market and keep a slippage of 2 ticks. Now since the trades are less, slippage is not that big a factor but it still may take 30-35% of our profits.
4. Now i develop logic for adds. In a breakout system winners are almost 40-45% and rest are small loosers. I need to maximize on my winners. eg: in this system there is also a good logic for adding. So i will add on the winners.

Only this is the way that I have found working for me and reducing the slippages.

Thanks,
MT
 
#98
Hi Edward,
Thanks for the post.

Even when I was testing my system I tried everything possible to remove slippage (some being as you mentioned above).
But the reality is that you have to deal with this menace.
The only thing which I find helpful is:

1. First test the baseline system, deducting the commissions (not deducting slippage).
2. I tend to reduce trades as much as i can and also increase the avg profit/ trade at the same time.
3. Now we have a system which has good avg profit/trade, takes a few trades, but the problem is breakout system generate huge orderflow and hence slippage. So I decide to enter at market and keep a slippage of 2 ticks. Now since the trades are less, slippage is not that big a factor but it still may take 30-35% of our profits.
4. Now i develop logic for adds. In a breakout system winners are almost 40-45% and rest are small loosers. I need to maximize on my winners. eg: in this system there is also a good logic for adding. So i will add on the winners.

Only this is the way that I have found working for me and reducing the slippages.

Thanks,
MT
hi MT,

I agree that you want to limit the number of trades. But the problem is how to decide which trades to take and which to ignore. The code I posted also trades pre-market and after-hours when the volume is very low so one thing that can be done is to remove these trades. Then still, if you want to trade automatically, you need some method to filter out the trades that have little potential to become a winner trade.

If you have suggestions I could build them in and test it.
 
#99
sir , actually we can plot only one multi tf pivot line using current formula ,
i mean to say that if 15m , hourly and daily also can be plotted along with regular 5m tf , than a great help .
all tf's pivot line(peaks,bottom's) plotted in 5m tf .
here , intention is to trade the major confluence line , where multiple tf's pivot line are at same point .
dell, I can make such code but will post later or tomorrow, have to go for a bit now.
 

Similar threads