Pin Bar System

Should Pocrel trade the "pin bar system" live again


  • Total voters
    24
  • Poll closed .
out of gold for -10. going thru a rough patch..
nice one, going my favour now....maybe for me its best to put stops and limits and NOT look at the market again till position is closed.
 
most of the currencies autopivot indicators are very good but always double check(something i never did yesterday) but when it comes to pivot levels for index and commodities then you need to look at livecharts and oilngold.com to confirm the correct levels
input them into the manual pivot level indicator

Thanks for the reply.

For currency Pivots I am using autopivotindicator-ver5 but they are 6-12 pips out from the charts you posted on GBP/USD.

Can you tell me which currency pivot indicator you are using so that we are on the same page.
 
charts

eurjpy.gif

wti.gif
 
I am making progress with the EA. I have managed to get the PinBar code into it and Pivots. With the Pivots you get the option of letting it calculate your pivots or putting them in yourself. You also get the options with pin bar indicator.

Just got to sort the trading stuff now.
 
Done for the day

totals
trades: 4

+114 full points


if we did nt have that **** up yesterday with gold then what can i say the system is flying (y)
 
A new EA. :clap:

This one has the PinBar indicator code and the Pivot code inside it so it backtests really quick (which is a good job since there are sooo many options in the EA).
I had best go through some of the parameters first.
extern bool IsFiveDigitBroker = true; (Self Explanitory)
extern int MinPercentRange=50; (PinBar Indicator)
extern double BodyToRangeRatio = 35; (PinBar Indicator)
extern double BodyDirectionalPercent = 45; (PinBar Indicator)
extern int StartHour = 8; (If you want it to trade between certain hours)
extern int EndHour = 18; (If you want it to trade between certain hours)
extern double Lots = 0.1; (If you want to use fixed lots rather than risk a % of your account)
extern double ClosePartAt = 1; (This will close part of the trade at 1x the risk. Change to 0.5 for half or 2 for twice the risk. Set at 0 to disable)
extern double BreakEvenAt = 1; (This will move the stop to Break even at 1x the risk. Set at 0 to disable)
extern double StartTrailAt = 1; (This will start trailing the stop at 1x the risk. Set at 0 to disable)
extern int TrailingStop = 1; (This will trail the stop at 1x the risk after it has started (above). The above parameter must be set for it to have effect)
extern double OffsetPoints = 1; (how far from the high/low of the bar you want to place your order)
extern double Risk = 5; (your account risk as a percentage. To use fixed lots you need to set this to 0. This overrides the ‘Lots’ parameter)
extern bool IsFX = false; (because fx trades on a Sunday you need this to true if you are running it on fx so it ignores Sunday when working out the pivots)
extern bool UseAutoPivots = true; (if you would rather enter your own pivots every day, set this you false and enter them below.
extern double R3 = 0;
extern double R2 = 0;
extern double R1 = 0;
extern double P = 0;
extern double S1 = 0;
extern double S2 = 0;
extern double S3 = 0;

Its default target is the next pivot level (just like the manual system). It looks quite good if you set it to close half at 1x and trail the stop 1x risk from the point you close half. I have included April/May EurUSD strat test. Its poor data but this shows a profit while the last EA showed a loss over the same period.

Let me know how you find it. Also play with the settings and if you find a set that is profitable share with the rest of us.

Oh yes....Use at your own risk :whistling
 

Attachments

  • EurUSDApril.zip
    10.7 KB · Views: 107
  • HSPinBarTrader.mq4
    15.1 KB · Views: 267
A new EA. :clap:

This one has the PinBar indicator code and the Pivot code inside it so it backtests really quick (which is a good job since there are sooo many options in the EA).
I had best go through some of the parameters first.
extern bool IsFiveDigitBroker = true; (Self Explanitory)
extern int MinPercentRange=50; (PinBar Indicator)
extern double BodyToRangeRatio = 35; (PinBar Indicator)
extern double BodyDirectionalPercent = 45; (PinBar Indicator)
extern int StartHour = 8; (If you want it to trade between certain hours)
extern int EndHour = 18; (If you want it to trade between certain hours)
extern double Lots = 0.1; (If you want to use fixed lots rather than risk a % of your account)
extern double ClosePartAt = 1; (This will close part of the trade at 1x the risk. Change to 0.5 for half or 2 for twice the risk. Set at 0 to disable)
extern double BreakEvenAt = 1; (This will move the stop to Break even at 1x the risk. Set at 0 to disable)
extern double StartTrailAt = 1; (This will start trailing the stop at 1x the risk. Set at 0 to disable)
extern int TrailingStop = 1; (This will trail the stop at 1x the risk after it has started (above). The above parameter must be set for it to have effect)
extern double OffsetPoints = 1; (how far from the high/low of the bar you want to place your order)
extern double Risk = 5; (your account risk as a percentage. To use fixed lots you need to set this to 0. This overrides the ‘Lots’ parameter)
extern bool IsFX = false; (because fx trades on a Sunday you need this to true if you are running it on fx so it ignores Sunday when working out the pivots)
extern bool UseAutoPivots = true; (if you would rather enter your own pivots every day, set this you false and enter them below.
extern double R3 = 0;
extern double R2 = 0;
extern double R1 = 0;
extern double P = 0;
extern double S1 = 0;
extern double S2 = 0;
extern double S3 = 0;

Its default target is the next pivot level (just like the manual system). It looks quite good if you set it to close half at 1x and trail the stop 1x risk from the point you close half. I have included April/May EurUSD strat test. Its poor data but this shows a profit while the last EA showed a loss over the same period.

Let me know how you find it. Also play with the settings and if you find a set that is profitable share with the rest of us.

Oh yes....Use at your own risk :whistling

Mr Mata Nui

Not only are you very talented at programming but you are also very generous in posting this up on the forum. We need more people like you. You are a legend.:)
 
Mr Mata Nui

Not only are you very talented at programming but you are also very generous in posting this up on the forum. We need more people like you. You are a legend.:)

Its an initial version so it will need work. For example i think the pivots on the commodities are off on some days. I will look into it but at least if you want to forward test you can input pivots in the morning. What i have found is changing the settings really makes a difference. I have almost doubled the profit on the EURUSD strat test by playing with BE, Trailing settings.

ALSO

The EA does have a magic number so you can run it on different charts BUT i didnt make it external, I will fix this in the next release but in the mean time if you want to forward test on several charts you will need to:
1. In strategy tester click on the 'Modify Expert' button.
2. Scroll down to find this code

static color EnterLongColor = Green;
static color EnterShortColor = Red;
static color ExitLongColor = Blue;
static color ExitShortColor = Pink;

int Magic = 12343412;
string ExpertName ="HSPinBarTrader";
double Pivots[7];
bool OpenLong = false;
bool OpenShort = false;
double Stop = 0;
double Entry=0;
double DigitMod = 1;
int LastTicket=0;
double lotTemp=0;

3. Change the 'int Magic' to 'extern int Magic'
4. you should now be able to change this in the expert settings (remember every chart you run it on needs a different magic number).
 
Its an initial version so it will need work. For example i think the pivots on the commodities are off on some days. I will look into it but at least if you want to forward test you can input pivots in the morning. What i have found is changing the settings really makes a difference. I have almost doubled the profit on the EURUSD strat test by playing with BE, Trailing settings.

ALSO

The EA does have a magic number so you can run it on different charts BUT i didnt make it external, I will fix this in the next release but in the mean time if you want to forward test on several charts you will need to:
1. In strategy tester click on the 'Modify Expert' button.
2. Scroll down to find this code

static color EnterLongColor = Green;
static color EnterShortColor = Red;
static color ExitLongColor = Blue;
static color ExitShortColor = Pink;

int Magic = 12343412;
string ExpertName ="HSPinBarTrader";
double Pivots[7];
bool OpenLong = false;
bool OpenShort = false;
double Stop = 0;
double Entry=0;
double DigitMod = 1;
int LastTicket=0;
double lotTemp=0;

3. Change the 'int Magic' to 'extern int Magic'
4. you should now be able to change this in the expert settings (remember every chart you run it on needs a different magic number).

well done Mata Nui

this is fantastic stuff well done

lets see how we can tweak it to perfection :)(y)
 
thanks Mata Nui for your effort again

its been a massive day for the system

if we where to automate it then i think this is where it would stand today based on my half off at 1 to 1 and let the rest run to pivot (this is my visual results)

eurjpy

2 trades 1 breakeven 1 +46.5

gbp -20

aud +23 other half still running up +28

eurgbp +18.5


+71 on currencies so far

index

dow +17 on half and the other half is up +30

so +28.5

Nasdaq +5 still running

Wti crude +120 on half oher half up +180

so +150 currently

silver -20

gold -30

total automated trades 10

+204.5 full points
 
Optimization on EUR/USD over the past month shows it is pretty good (Pic Below). Trying to optimize cable though shows NO profitable settings for the last month. A quick visual backtest seems to confirm this.

Has anyone got any valid trades for cable that might suggest otherwise? If not i say probably best to simply drop it.
 

Attachments

  • TesterGraph.gif
    TesterGraph.gif
    8.3 KB · Views: 155
Top