Point and figure charts automated trading system

Point and figure charts automated trading system
Here is a system that trades automatically point and figure charts.

The way it works :

All closing prices are sorted into boxes at the end of each bar – e.g. with a box size of 20 points, a close of 8247 will be in the box from 8240 to 8260.

The parameter "LowerBorderBox" is the lower end of this box. The upper end is LowerBorderBox + Boxsize.

When uptrend = 1 and downtrend = 0, there is an upward trend with long positions (XXXXX in P & F notation). When downtrend = 1, positions will be short (OOOOOO in P & F notation).

All boxes start at a value of 0 and their position is therefore fixed. For a box size of 20, we have boxes starting at a lower value of 0, 20, 40, 60, and so on. Or 8200, 8220, 8240, 8260…

The variable "UptrendHigh" defines the lower price of the highest box (X) of a current uptrend. The variable "DowntrenLow"  defines the lower price of the lowest box (O) of a current downtrend.

The variable "turnafternn" sets after how many boxes in the opposite direction of the current trend, the trend direction is switched, e.g. from uptrend = 1 to downtrend = 1. Then, a buy or sellshort signal occurs.

For results identical to the point & figure charts built in ProRealTime, you have to set this threshold value to one unit higher than in the built-in charts. So, when we say that the P&F trend switches direction after 3 new boxes in the opposite direction in the built-in charts, we have to set turnafternn to a value of 4 in the automated trading system. I don't know exactly why this is the case, but it appears that there is a difference in the definition of what a move of one box is. When we respect this difference, the point & figure charts are identical for the trading system and the built-in charts.

The results of point and figure trading are very much dependent on the box size. There is no single optimum value of the box size. As in Renko trading, results depend a lot on chance.

 
defparam cumulateorders = false

ONCE uptrend = 1
ONCE downtrend = 1

n = 1

Boxsize = 20

turnafternn = 4
LowerBorderBox = round((close / Boxsize) - 0.5) * Boxsize
ONCE DowntrendLow = LowerBorderBox
ONCE UptrendHigh = LowerBorderBox

If LowerBorderBox > LowerBorderBox[1] then

 If uptrend = 1 then
 downtrend = 0
 ONCE DowntrendLow = LowerBorderBox
  If LowerBorderBox > UptrendHigh then
   UptrendHigh = LowerBorderBox
  endif
 endif

 If downtrend = 1 and LowerBorderBox >= DowntrendLow + (turnafternn * Boxsize) then
  UptrendHigh = LowerBorderBox
  uptrend = 1
  downtrend = 0
 endif

elsif LowerBorderBox < LowerBorderBox[1] then

  If downtrend = 1 then
  uptrend = 0
  ONCE UptrendHigh = LowerBorderBox
   If LowerBorderBox < DowntrendLow then
    DowntrendLow = LowerBorderBox
   endif
  endif

  If uptrend = 1 and LowerBorderBox <= UptrendHigh - (turnafternn * Boxsize) then
   DowntrendLow = LowerBorderBox
   uptrend = 0
   downtrend = 1
  endif

endif

If uptrend = 1 and uptrend[1] = 0 then
 buy n contracts at market
endif

If downtrend = 1 and downtrend[1] = 0 then
 sellshort n contracts at market
endif

set stop ploss 350
 
Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Doctrading • 99 days ago #

    Interesting concept, good work !

     

  2. verdi55 • 99 days ago #

    Thank you. This is mainly to show the concept, but I would not trade with this system as it is. Maybe someone can find additional criteria how to improve the performance, and, above all, the reliability and constancy of a point and figure trading system. The problem with such systems (point & figure, as well as Renko) is the fixed box size and box position over the whole chart. You can get good results with a box size of 35, for example, but losses for a box size of 36. Box size 37 may be good again. Let not fool yourselves by the optical appearance of point & figure charts (or Renko) !

avatar
Register or

Likes

avatar
Related users ' posts
DEIO Hi Eva, If you mean the application of stop loss, the strategy doesn't apply the classical ...
DEIO Hi Bard, first of all thanks for the long explanation regarding the issues posted. The cri...
Alex975  Ciao Deio, interesting strategy.. thanks to show it
Nicolas The "RSI 2 periods" is a strategy so many times coded and modified by traders worldwide :) I...
Vincenzo Di Guida quindi mi dici che se lo metti in reale non funziona?
Nicolas Indeed, if you are not willing to loose, you will always win. Averaging down losers can carr...
David You're always safer going Long especially with averaging down on an index as the probability...
bluetime6 Hello Nicolas. Can i ask you for something? I backtested your strategy in Dax 4H Timeframe...
Francesco78  Sorry I must add that it looks great only if we start the backtesting from 2008. Im not fa...
Nicolas You can't upload images here, sorry.
triss1965@gmail.com Hi, I dont understand, when I do the backtest I get only drawdown and a big loos? Have I mis...
Lotar
4 weeks ago
Lotar @ Jonjon: First the strategyprofit has to be higher than sp. After that sp is set to the new...
Plop61 Hello,Your strategy is amazing, thanks for sharing.Is it possible to make the same code for ...
Lotar Hi Plop61, thanks for your comment. To make the code for short positions is possible. But ...
DEIO hi Derek, so you mean that you are using CASH contract as US 500 Cash (mini or full doesn't...
Derek It's a CFD on the futures contract. That's why there is no commission and IG calls it a Forw...
Derek Clarification: Automatic rollover will be into the nearest forward but I prefer the farthes...
iramirez55 thanks for all
johnymon Hi Reiner, Many thanks for the  superb strategy.I just tried to back-test on prerealtime bu...
Reiner Hi Joy John, Navigator will allways sell at 9:00 at the first tdom and will accumulate a lo...
GabrielVP Hola. ¿Has probado a incorporar compras en el mismo sistema? o ¿sería posible? disculpa mi i...
Raul Vg Hello, please comment on the forum link that appears in the description. In that same forum ...
Iber0 Con esta modificación reinviertes las ganancias y la curva mejora bastante arriesgando menos...
Iber0 Asi quedaria con el spread de IG [IMG]http://i65.tinypic.com/2418ism.jpg[/IMG]
Raul Vg Hi alemaliz, In the IG broker, the minimum trailing stop is 5 with the open market.  
Nicolas For everyone information, a discussion thread is ongoing here: https://www.prorealcode.com/t...
larouedegann Bonjour Nicolas, comment se fait-il qu'avec cette stratégie stop loss à 5 pips, PRT mettant...
pascal3431 Salut Doc , Je ne vois pas ce qui fait office de stop dans ce code .. un retour dans le nua...
Doctrading Bonjour, Il s'agit juste d'une stratégie où on est toujours en position : soit à l'achat / ...
pascal3431 Bonjour, après quelques essais sur EUR/USD au M15 en rajoutant(car sinon on est en perte) u...
Raul Vg Hi jonjon, these figures are the most appropriate for the strategy. Atr is an average true r...
barbagio Hola Raul,gracias por compartir sistema, muy interesante. Tengo unicamente una duda sobre el...
jonjon Hi Raul. Just a thought, is there a way to limit the maximum number or orders that can be ac...
verdi55
3 months ago
Nicolas I'm sorry, upload of attachments is actually not possible in the comments.
PRT_kok hi Verdi, nice try...I've developed a similar strategy but got poor profit factor...what's y...
verdi55 The profit factor depends very much on the brick size AND on the position of the first bar o...
Elsborgtrading Hi Triss. the File is in the post for download. There is nothing wrong with the code. Your e...
danhei Hi I am tryong to figure out how trist strategy works. I am new to pro real time. Can some...
Plop61 Hello,Thank you for sharing this beautiful strategy.Is it possible to indicate the code for ...
ALE
5 months ago
maxxb a ok quindi potrei anche non aver sbagliato nulla ... grazie ..  
sunandsea12345 scusate sono nuovo del forum ,dove posso chiedere come posso generare un codice che mi perme...
ALE Ciao Puo andare nel forum Supporto pro order In fondo troverai lo spazio per inserire un ...
Nicolas Hello DonDollar, and thanks a lot for your contribution to our community :) A "keep it simp...
DonDollar Ni Nicolas, thanks for the comment. I started with a 3000$ Position and 1 Pip Spread. I fo...
DonDollar Stupid me, it is indeed 1 POINT Spread....  
mbaker15 How is this system performing live guys? Has anyone been running it?
ellejoe Hi Ale, can you please share your live results and updated version with us? Was this strateg...
ALE Hello ellejoe,since 1th november 2016,I can confirm probacktest results, I cant run it in li...
DANY I did it on demo account; it's too dangerous for mea and I can not resist psychologically  ....
demoz How can a demo account be dangerous? Did you have it run live (on a demo account for exampl...
DANY Yes, I mean that I tried on a demo account for 2 months and it had work fine, like the BackT...

Top