stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Pinoccio: trade those pins
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2055
Page 1 of 4
Author:  SteveHopwood [ Sun Apr 28, 2013 6:15 pm ]
Post subject:  Pinoccio: trade those pins

SERIOUS WARNING
  • Most Forex traders lose all their money.
  • Using the robot posted here in trading Forex does not guarantee success.
  • Trading this robot could lead to serious financial loss.
  • Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  • This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
  • At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
  • To trade this robot, you have to understand:
    • How to use EA's. Remember to set IsGlobalPrimeOrECNCriminal to 'true' if your crim insists on two-stage order sending.
I am not yet trading this EA on my live account

Attachments
  • Shell user guide.pdf: This describes the usual inputs in my EA's. Consult it for details not listed below.
  • Pin Bars - Introduction: a fabulous description of pin bars. Read this first. You will not understand what is going on here until you understand the concepts of a PB 'nose' and its 'eyes'.
  • PinbarDetector.mq4 is the indi the EA uses to detect pin bars, so it goes in your indicators folder. Have it on your chart so you can see when Pinoccio detects one correctly - or incorrectly.
  • PinBar Detector.pdf: describes the inputs sent to the indi.
  • Pinoccio.mq4: goes in your Experts folder and is the auto-trader you drag onto your charts.
Introduction
Pinoccio's genesis lies at http://www.stevehopwoodforex.com/phpBB3 ... f=5&t=1774, in the Rail Road Track 'n Pins EA. It is clear towards the end of the thread that my initial understanding of a pin bar was slightly flawed. I have decided to separate the pin trader from the rrt trader for now. Once this is correct, I shall re-introduce the rrt functions.

Inputs not described in my user guide
  • Trade exit:
    • StopLossAddPips: if this is > 0. P uses the hilo of the pin candle to set a stop loss, adding this to the stop for a sell, and subtracting it from a buy. P keeps a note of how many pips are involved for use in the tp.
    • SlMultiplierForTp: if > 0, P multiplies the pips in the calculated stop loss by this figure, to increase the reward:risk ration
  • Support and Resistance:
    • Pivots:
      • UsePivots: if enabled, P will only send a trade if the pin has pierced/touched the nearest W1 or D1 pivot, then bounced back. You will see that there are inputs that allow you to chose your own colour for the pivot lines. By default:
        • the nearest WP or WMP resistance is a dashed yellow line.
        • the nearest DP or DMP resistance is a dotted yellow line.
        • the nearest WP or WMP support is a dashed blue line.
        • the nearest WP or WMP isupport is a dotted blue line.
    • Andrew's s/r indi:
      • our thanks to slipshod for providing us with this fabulous indi and the library code used by this EA. To use it:
        • SS_SupportResistance_v04c.mq4 goes in your Empty4/Experts/Indicators folder.
        • LibSSSRv2.mqh goes in your Empty4/Experts/Include folder. Pinoccio will not work without it.
        • LibSSSRv2.mq4 goes in your Empty4/Experts/Indicators folder. Pinoccio will not work without it.
      • a Pinbar will only be considered tradable if its hi pierces then retreats from resistence (buy) or support (sell). The inputs:
        • UseSlipshod: turns the filter on or off.
        • UseResistanceZoneHigh: uses the high of the the next resistance zone as the line to reach.
        • UseResistanceZoneLow: uses the low of the the next resistance zone as the line to reach.
        • UseSupportZoneHigh: uses the high of the the next support zone as the line to reach.
        • UseSupportZoneLow: uses the low of the the next support zone as the line to reach.
  • Custom indi inputs:
    • PinBarTF: this is the Pinbar Detector time frame and defaults to 'the current chart'. If you want to always trade, say, the M15 but wand to look at a different time frame without upsetting P, then enter 15 into this input. This is our trading time frame.
    • MinCandlesInSequence: taking a sell trade as an example:
      • a new candle opend.
      • P looks back two candles and discovers a pinbar high, signalling a possible sell trade.
      • P then looks back three candles ago and compares its high with that of the previous MinCandlesInSequence, and only takes the trade if it is the highest.
    • the remaining inputs are those used by the indi.
      • UseCustomSettings tells the indi whether to use the settings in the rest of these inputs, or whether to use its own internal defaults. Therefore, if you want to play with different settings in P and have these reflected by the indi on your chart:
        • UseCustomSettings = true in both P and the indi.
        • you must make the changes you require in both P and the indi. Good luck.
  • Moving average:
    • this defaults to Bob's 240 H4 moving average that is becoming the Gold Standard for deciding the overall trading direction. Unless you are an idiot who has steadfastly refused to read his 10.4 thread despite the number of times I have recommended it, you will know how the filter works. Disable it by setting MaPeriod to zero.
Development
The first thing to do is find a set of inputs that allow the indi to show the pin bars we are looking for i.e.:
  • bearish pin bar:
    • left eye should be a rising candle.
    • pin should have a long upper wick and a body close to its low.
    • eyes and nose should be higher than those of preceeding candles, but the right eye must not be higher than the pin.
  • bullish pin bar: reverse the above
Posts that will attract sever trouble for the poster
  • posts about backtests in Crapergy Tester. I do not care about such craptests and will delete posts about them; if in a bad mood, I will delete the poster.
  • posts that show the poster has not read this post. It has taken me a long time to prepare.
Conclusion
Let's see how fast this sprinter can run. There will be many early revisions as bugs emerge and we refine the strategy. I will start on demo with M15, using pivots and the moving average; no Slope.

Have fun.

:D


Matters of general interest
Go here to download and run the script that will fill your platform's missing chart history: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=254
Read this post:
http://www.stevehopwoodforex.com/phpBB3 ... p?f=6&t=78 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79, at the bottom of the post.

Useful utilities/EA's/scripts
Author:  cuzgeorge [ Sun Apr 28, 2013 6:46 pm ]
Post subject:  Re: Pinoccio: trade those pins

I'm in! :D
Steve, great to see you are having those wonderfull bath moments again. 8-)

This one seems to have something magical in it, maybe Pippa is haunting me right now, but so happy to see this one here. Will be up and running as soon as i get through your paper-work.
regards and good luck with Pinoccio.
cuz
Author:  slowkey [ Sun Apr 28, 2013 11:32 pm ]
Post subject:  Re: Pinoccio: trade those pins

Oh I guess I am in to Steve. HI George. :D
Author:  Sundog [ Sun Apr 28, 2013 11:58 pm ]
Post subject:  Re: Pinoccio: trade those pins

Thanks Steve, setting it up now.
Author:  tex [ Mon Apr 29, 2013 3:11 am ]
Post subject:  Re: Pinoccio: trade those pins

Hi Steve,

thanks for your fast work. Ive had a play with pinoccio and i think theres something wrong with trade opening -> the EA only opens BUYS.

And the candle sequence seems to have a problem too. I set MinCandlesInSequence = 5 and Pinoccio takes pinbars that are not at the top or at the bottom of the previous 5 candles.

Can u check this please ?

Thanks and all the best,
tex
Author:  bernard [ Mon Apr 29, 2013 2:26 pm ]
Post subject:  Re: Pinoccio: trade those pins

Hi Steve,

Please see the screenshot.
The trade should have been a sell. Since the price is above MA240 then there should be no trade at all. But, it was a buy.
It was detected as a rogue trade and closed.
The message on the chart reads: ..... remove the EA immediately............
All OOTB, except size is 0.1, ECN, TF=60

tks,
Bernard
Author:  SteveHopwood [ Mon Apr 29, 2013 3:09 pm ]
Post subject:  Re: Pinoccio: trade those pins

V 1a is in post 1.

Those wrong-direction trades were because I did not notice I had selected the wrong option from the code editor's auto-complete.

I have also added code to ensure the right eye is no higher than a pb high, or lower than a pb low.

:D
Author:  alfredocastanho [ Mon Apr 29, 2013 4:00 pm ]
Post subject:  Re: Pinoccio: trade those pins

Hello Steve and all traders in here.

This is my first post.

First i want to say thanks for the great work that has been develop in here. Realy good stuf with good traders.

Now about this pin bars. When i was starting reading CJ material. I was looking at charts and i get to look at this pattern and i think i have something here.

Now i have look at several charts. Lol i was impressed how many times this setup appears on charts. Also if traded how many would turn in to bad trades.

I´m posting this here because i have notice going over CJ material and M and W formations.

Now you are making a EA for those.

This setup can be easy traded manualy. But is it possible to trade it with a EA?

Image

Hope this helps anyone catch some extra pips.

Just look at charts and take your conclusions.

All the best

Alfredo
Author:  tex [ Mon Apr 29, 2013 6:48 pm ]
Post subject:  Re: Pinoccio: trade those pins

Steve,

can u make Pinoccio to take more than one trade in a sequence ?

There are often times where there are more than one valid entry pinbars after another and taking all of them

should be a benefit for the EA.

See Screenshot.

Thanks
tex
Author:  SteveHopwood [ Mon Apr 29, 2013 8:30 pm ]
Post subject:  Re: Pinoccio: trade those pins

tex wrote:Steve,

can u make Pinoccio to take more than one trade in a sequence ?

There are often times where there are more than one valid entry pinbars after another and taking all of them

should be a benefit for the EA.

See Screenshot.

Thanks
tex
Sure can. Let's get it taking trades correctly first?

:D
All times are UTC Page 1 of 4