PolyFitScalper

 

This is EA based on well-known range scalping technique during night hours (GMT) for such pairs like EURGBP, EURCHF and GBPCHF.

In the EA is used indicator PolyFitBands_v2.3 which you can find in the attachment. The breakout of Upper Band is a signal for opening of SELL position and vice versa the breakout of Lower Band - BUY position.

Also the EA are used advanced timing settings because timing factor is very important for scalping.

Explanation of all settings:

//---- input parameters

extern string Expert_Name = "PolyFitScalper_v1.57";

extern int Magic =157157; // Magic Number

extern int Slippage = 3;

extern string Main_data = " Trade Volume & Trade Method";

extern double Lots = 0.1; // Trade Volume

extern int MaxOrders = 3; // Max Orders Number

extern double TakeProfit = 0; // Take Profit Value in pips

extern double ProfitTarget = 0; // Profit Target Value

extern double ProfitMode = 0; // Profit Mode for Profit Target:0-pips,1-USD

extern double MinProfit = 1; // Min Profit in pips

extern double ProfitRatio = 0.5; // For Profit Close: Distance from Up/Dn Bands in portions of width (ex.0.5-middle)

extern double LossRatio = 0; // For Loss Close: the same as Profit Close

extern double StopLoss = 45; // Initial Stop Value in pips

extern int TrailingMode = 0; // 0-off,1-standard,2-System by Up/Dn Bands

extern double TrailingStop = 0; // Trailing Stop Value in pips

extern double StopDeviation = 0; // Deviation from Up/Dn Bands in %(TrailingMode=2)

extern double BreakEven = 0; // Break-Even Value in pips

extern double PipsLock = 0; // Lock in pips

extern int ExitMode = 1; // Exit Mode: 0-off, 1-on

extern int ECN_Mode = 1; // ECN Mode: 0-off,1-on

extern int Comment_Mode = 0; // Comment Mode: 0-off,1-on

extern string Time_Inputs = " Timing parameters ";

extern int MainTimeFrame = 0; // Time Frame in min

extern int StartHour = 22; // Start Hour of Trade Session

extern int StartMinute = 0; // Start Minute of Trade Session

extern int EndHour = 8; // End Hour of Trade Session

extern int EndMinute = 0; // End Hour of Trade Session

extern int MonStartHour = 8; // Monday Start Hour of Trade Session

extern int MonStartMinute = 0; // Monday Start Minute of Trade Session

extern int FriEndHour = 22; // Friday End Hour of Trade Session

extern int FriEndMinute = 0; // Friday End Hour of Trade Session

extern int TradeDay = -1; // Trade Day of Week (ex.1-Monday,-1-all Days)

extern int NonTradeDay = 0; // Non-Trading Day of Week (ex.5-Friday)

extern int CloseTimeMode = 0; // CloseTime mode: 0-off,1-on

extern int CloseHour = 24; // Trade Close Hour

extern int CloseMinute = 0; // Trade Close Minute

extern int FriCloseHour = 22; // Trade Close Hour in Friday

extern int FriCloseMinute = 55; // Trade Close Minute in Friday

extern double ProcessTime = 3; // Process Time for Close Orders by Time

extern double OrdDuration = 1.5; // Min Orders duration

extern string ScheduleName = "Schedule1.txt"; // Name of Schedule's File

extern int ScheduleCheck = 0; // Check of Schedule in Experts Window

extern int ScheduleMode = 1; // Schedule Mode: 0-off,1-on

extern int TimeShift = 0; // Time Shift in hours (for Schedule only)

extern string PS_Inputs = " PolyFitBands parameters:";

extern int PS_TimeFrame = 0; // Time Frame in min

extern int PS_Price = 0; // Apply to Price(0-Close;1-Open;2-High;3-Low;4-Median;5-Typical;6-Weighted)

extern int PS_Length = 150; // Number of bars for an evaluation

extern int PS_Degree = 1; // Degree of a Polynomial(no more 12)

extern int PS_PreSmooth = 1; // Period of Preliminary Smoothing

extern int PS_MAMode = 0; // Mode of MA:0-SMA,1-EMA,2-Wilders(SMMA),3-LWMA

extern double PS_Sigma_min = 3; // Min value of Multiplier of Sigma(Standard Deviation)

extern double PS_Sigma_max = 3.7; // Max value of Multiplier of Sigma(Standard Deviation)

extern double PS_MaxDistance = 0; // Max Distance from middle in pips

extern int PS_Shift = 0; // Shift relative to the current bar

extern int PS_Mode = 1; // PolyTrend Mode: 0-off,1-trend(confirmation),2-signal

extern string MM_inputs = " Money Management";

extern int MM = 2; // ММ Switch(0-off,1-%% of Free Margin,2-L.Williams formula

extern double MaxRisk = 0.05; // Risk Factor in decimals

extern double MaxLots = 0; // Max Lots Size

Important notes:

-Before trading with this EA please try to find brokers with low spreads.

For this purpose I suggest to use SpreadoMeter_v2.

-Default settings and file Schedule1.txt are for EURGBP M1.

-File Schedule1.txt you should place in experts/files directory for trading or tester/files for testing or optimization.

TimeShift=0 is for Alpari UK(GMT+1), e.g., for MB Trading TimeShift=-6.

-PolyFitBands_v2.3 should be in experts/indicators directory.

PS. Settings and Schedule file for EURCHF M1 are added.

For EURCHF M1: unrar attached file EURCHF_M1.txt and did exact the same as we did for Schedule1.txt.

Beides, change in the setting of the EA the new name of the file to be as the following:

ScheduleName = "EURCHF_M1.txt";

Updated version posted here : https://www.forex-tsd.com/forum/exclusive/11580-polyfitscalper/page51#comment_753675

 

Thanks a lot.

I started to forward test it with Alpari UK default settings, EURGBP, M1.

One trade was open and closed.

 

I am getting good results for now.

But EA with default settings is not trading often as I see.

I asked Igorad and he replied that if we want for this EA to trade more often so change PS_Sigma_min from 3.0 to 2.0 or 1.5.

I changed to 1.5 and last trade were made using this new settings:

Files:
 

Just about spread.

Broco Investor platform.

 

Spread.

LiteForex broker.

 

Spread.

Alpari rus broker.

 

Spread.

Alpari UK.

 

Spread.

Forex.com broker.

 

Spread.

Broco Trader platform.

 

Spread.

FXCM UK.

 
newdigital:
I am getting good results for now.

But EA with default settings is not trading often as I see.

I asked Igorad and he replied that if we want for this EA to trade more often so change PS_Sigma_min from 3.0 to 2.0 or 1.5.

I changed to 1.5 and last trade were made using this new settings:

Hello Newdigital

how goes it?

do you know what the schedule1 is for?

Boy dont i feel like an idiot i red over it 2 times and didnt catch that it says right in the first post

sorry for that rediculous question