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.out of gold for -10. going thru a rough patch..
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.
here is my auto pivot indicator, but you still might get different levels to me as it will be based on your broker
View attachment 113520
View attachment 113522
also long crude again
trade alert eurjpy long
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.🙂
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).