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 • 29 days ago #

    Interesting concept, good work !

     

  2. verdi55 • 29 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
Raul Vg the same robot with trailing stop and other type of accumulator (you can keep the previous a...
Raul Vg A mi me dan solo 100.000, puedo ver año y medio
Raul Vg Yes, I have also tried it. But I would like someone who had 200,000 bars to show us how he b...
Jake26 Thanks for sharing your work with this code, Doc. Impressive results in backtests with shor...
Doctrading Hello, Actually I'm not trading this strategy. I'm looking to make a good automated tradin...
Rohan Hello Doctrading,  I am also very interested in the Ichimoku (I am trading it but discretio...
Nicolas I think Google Translate can do this job for you :)
iramirez55 Hola, gracias primero de todo. Por la mañana entre 7 y 12 también fuciona. Chao
Jesús Hola Raul VG, muchas gracias por compartir la estrategia, parece muy interesante el concepto...
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...
triss1965@gmail.com The code dose not work   Syntax error: line 2, character 12One of the following chara...
triss1965@gmail.com why do I get error ond line whit DAX? Eihter cod works. Can you chare the file?
Elsborgtrading Hi Triss. the File is in the post for download. There is nothing wrong with the code. Your e...
ALE
2 months ago
ALE CiaoGuadagno.
alemaliz Ciao Ale scusa se ti disturbo ancora possiamo sentirci in privato per un chiarimento su ques...
ALE Ma certo nel mio profilo trovi le info
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...
Nicolas Hi David, thank you for the contribution. I have tested the strategy through 200.000 bars an...
David Thanks Nicolas. I assumed that this would be the case when back tested further. 
Dimi.A Awesome mate.
ALE Hello Luca,no this strategy is overfitted. 
traderfred Hello ALE is that mean you are not going to use it live? I don't understand what is "overf...
ALE Hello Traderfed, because it run many operations over the past three years, instead of havin...
ALE
3 months ago
enzo_52 Hi Ale, so you have the same results with german 30 mini 1e cash TF 1h?  
ALE no, only with TF 15m
enzo_52 Grazie tante, Thanks so much 
ALE
3 months ago
ALE @Nicola Nicolas thanks for your kind attention, the same indicator used with different set c...
miguel33 In piena sintonia . 
Ernesto1 Grazie Ale per aver condiviso con noi il tuo indicatore  P.A.B. aspettiamo il tuo script s...
Matriciel
4 months ago
Matriciel These are the moving averages offset on the vertical axis.
Fabio Anthony Terrenzio It's incredible, this little offset make big difference! dunno why..
PRT_kok Amusante cette petite strat : elle est positive sur 200000 ut mais tu obtiens un DD de 78% d...
Cosmic1
4 months ago
Cosmic1 Hi Yngve, Amplitude relates to the range of the price action for the given times stipulated...
GAMMA I try as per your advise and change the time to usa time still no luck, may be I am doing so...
Cosmic1 Post the code you are using, will try and figure it out. What broker?
Elsborgtrading Hi Nicolas, and thanks for updating the file. When I backtest the code now I get a complete...
Elsborgtrading Hi Nicolas. I made a mistake. a FTSE chart had sneaked under the DAX and when backtesting I ...
Nicolas "set stop loss" are individual for each order with IG.
Cosmic1
5 months ago
Cosmic1 Hi Vish, Yes it was a good Thursday and Friday where between DAX and DOW breakout +800 point...
JakeDB I cannot get my time conversions correct for Sydney Australia to get any data for this code....
Cosmic1 @JadeDB What times are you putting in?
MikeGC Hi Max, Many thanks for your input. The 5 bar look-back only checks that the condition was...
MaxT Aha! I think that was when it was entering in my tests - on a change so I guess it is workin...
Alco Hi Mike, Thanks for your great code! It is working great on backtests, but I want to test it...
reb ok thks for the info Kenneth
Kenneth Kvistad Hi everyone. I tried to upload a screenshot of my live acc. That i started around 20july an...
demoz Keep us updated!
grizzly Great work - i use the cloud in some of my auto systems and very reliable.
Dymjohn Thanks for the comment grizzly, I like the look of your position sizing coding but won't use...
Elsborgtrading Hi John, and nice to see you took the Ichimoku a step further:-) One thing though, I think t...

Top