FREE FOREX STRATEGIES

Scalping system #18 (Scalping 1 min EU)


Submitted by ctlprogrammer

I wrote a scalping strategy for the EU 1 min chart.
See http://ctltrading.blogspot.com/2010/12/scalping-strategy.html
Expert advisor for GFT dealbook included.

First of all for those who don't know.
Scalping = http://en.wikipedia.org/wiki/Scalping_(trading)

How does this strategy work and how do you use it.

How does it work:

The strategy goes long when

1) the low of the current candle is lower than the lower bollingerband (deviation 1)
                         AND
2) the Fast Stochastics (line D) is lower than 19
                         AND
3) if you look back their is a candle with a close at least 5 pips lower than the current candle

The strategy goes short when

1) the high of the current candle is higher than the upper bollingerband (deviation 1)
                         AND
2) the Fast Stochastics (line D) is higher than 81
                         AND
3) if you look back their is a candle with a close at least 5 pips higher than the current candle

The strategy closes a long when

1)  the high of the candle is above the upper bollingerband (deviation 2!)
2)  the open P/L > 8000 X (distance between the upper band and lower band) X number of mini lots
3) the open P/L is bigger than  MaxLoss X number of mini lots

The strategy closes a short when

1)  the low of the candle is beneath the lower bollingerband (deviation 2!)
2)  the open P/L > 8000 X (distance between the upper band and lower band) X number of mini lots

3) the open P/L is bigger than  MaxLoss X number of mini lots

How do u use this strategy:

This strategy is written for mini lots (10.000) AND charts with 5 digits after the comma!!!!
Open EU timeframe 1 min. Attach the strategy to the timeframe. Then optimize the parameters:
h1=6   => The starting hour when the strategy is allowed to take a position
h2=23 => The latest hour when the strategy is allowed to take a position
So for above example strategy can take a position from 6 AM to 23 PM

MaxLoss=50 => The maximum allowed loss in case you use 1 mini lot
minilots=1 => The number of mini lots the strategy uses
So if you put 2 minilots, maxloss will be MaxLoss * 2
offset=1 => The level for the Fast Stochastics
offset =1 gives 81 and 19
offert =2 gives 82 and 18
......
or
offset=-1 gives 79 and 21

check=40 => the number of candles the strategy has to look back to find a lower or higher
Before using this strategy you must play with the paramters until you get a setting that gives you a positive backtest. This way the strategy is optimized for the current market conditions. Test shows that this strategy works pretty well under certain market conditions. Under no conditions i advice any live trading of course but you are free to test this strategy under a DEMO account.

The code:
strategy scalper;
/* written by ctlprogrammer for EUR/USD 1 min chart */
/*Warning for demonstration purpose only, no live trading please*/
/*you can freely copy the code but plz leave this header*/

/* www.ctltrading.blogspot.com*/

input h1=6,h2=23,MaxLoss=25, minilots = 1,offset=1,check=40;
vars currentbar = 1,stoch1min(series),t=0,t1=0,t2=0,longallowed(bool),shortallowed(bool),i(number);
begin
currentbar := back(close);
if currentbar < check then return;
 
Fast_Stochastics(close,5,3);

stoch1min:=Fast_Stochastics.line_d;
 
t:=hour(timestamp[currentbar])*60;
t1:=h1*60;
t2:=h2*60;

   
longallowed:=false;
shortallowed:=false;
Bollinger_Bands(close,20,1);
if t>=t1 and t<=t2 and stoch1min[currentbar]< (20-offset) and low[currentbar]<Bollinger_Bands.line_lower[currentbar] and not short() and not long() then

  begin
        for i:=1 to check do
        begin
        if close[currentbar-5-i]<(close[currentbar]-0.0005) then longallowed:=true;
        end;
        if longallowed=true then

        begin
        buy(minilots);
        end;
  end;

if t>=t1 and t<=t2 and stoch1min[currentbar]> (80+offset)  and high[currentbar]>Bollinger_Bands.line_upper[currentbar] and not short() and not long()then

 begin
        for i:=1 to check do
        begin
        if close[currentbar-5-i]>(close[currentbar]+0.0005) then shortallowed:=true;
        end;
        if shortallowed=true then

        begin
        sell(minilots);
        end;
 end;

Bollinger_Bands(close,20,2); 
if short() and low[currentbar]<Bollinger_Bands.line_lower[currentbar] then exitshort();

if long() and high[currentbar]>Bollinger_Bands.line_upper[currentbar] then exitlong();

 Bollinger_Bands(close,20,2);  
if fpl()<-8000*minilots*(Bollinger_Bands.line_upper[currentbar]-Bollinger_Bands.line_lower[currentbar]) then
 begin
 if long() then begin alert("text","fpl BBS"); exitlong(); end;
 if short() then begin alert("text","fpl BBS"); exitshort(); end;
 end;

if fpl()<-MaxLoss*minilots then
 begin
 if long() then begin alert("text","max loss"); exitlong(); end;
 if short() then begin alert("text","max loss"); exitshort(); end;
 end;
 
  end.

Greetings
ctlprogrammer


Edward Revy,
http://forex-strategies-revealed.com/

Copyright © Forex Strategies Revealed

This is a great site, I am learning a lot from here.
Thank you for sharing these information.

Please if someone can provide an EA for the above system to be used on MT4?
Thank you in advance, and appreciate your help

Hey User- You are all over these threads !

Slingshot, IKH-HA strategy and now here . First , you claim to be a novice, but

you are NOT . Who are you ?

Harry

hi,ctlprogrammer am trading with marketiva streamer, can you automate it?

thanks in advance
edu
kenya

No sorry to busy right now. :-)

Sir, have you finished the program in MT4 yet?
Regards,
BT

In the strategy we check over a period of x candles back if their was a close 5 pips lower than the close of the last candle. So the strategy actually trades in the direction of the trend.

The default value of x is 40. So default the strategy checks if in the last 40 minutes their was a close 5 pips LOWER than the current candle.

Like with all strategies the most important is to know when to use this strategy. I use this strategy when i see the market conditions are great.

So when are the market conditions great?
- when its ranging
- when its trending

So when are the market conditions not OK?
- when the market is changing trend all the time

So why do i like this strategy?
Because its ok to use in 2 out of 3 situations. Meaning its ok to use in a trending and ranging market. Its only bad when the trend is changing multiple times/day

I started programming in MT4 MQL too. Will translate this in MT4 MQL soon.

ctlprogrammer

I must comment regarding the several novices who say they don't understand the terms and ask for a simplified version of the strategy.

All the terms used in the TEXT explanation of the strategy are quite basic. If you don't understand them, you should not be trading. You can easily look them up using Google to get a definition and explanation. investopedia.com or wikipedia.com can help you help yourself. You are more likely to get an answer here if you ask a specific question, for example "How far back do you go to look for a candle that's 5 pips higher/lower than the one that pierced the Bollinger Band?" But you should not be asking "What is a Bollinger Band?" You need to Google that for yourself.

On the other hand, if you are asking for a definition of the words used in the PROGRAMMING code example, that's more difficult, because the answers are specific to the code language itself. The programming code language on your trading platform may be different from the code language used by Mr. ctlprogrammer. In fact his coding language IS CTL. You may be using MT4, or C#, or MQL4, or EasyLanguage. If you are an experienced programmer, the text description of how the strategy works is sufficient information to allow you to reproduce the strategy in the programming language you are familiar with. If you are not an experienced programmer, I tell you that this strategy is fairly simple, and it would be a good learning exercise for you to try and program it in whatever automated trading language you have. If you are unsuccessful, post your broken code here to show you made some effort, and ask for corrections in your code.

Ask intelligent questions that illustrate that you are making some effort to teach yourself. And provide some background about what trading platform you are using and what language are you programming with. Send snippets of your code and ask why it doesn't work, or how it could be improved. Prove that you are attempting to solve the problem rather that asking to be spoon-fed.

If you are unwilling to ask intelligent questions and make an effort to educate yourself, I'd advise you to subscribe to one of these:
1) A Forex trading tip service. They will send you buy and sell signals, and you don't have to know anything about why they are buying and selling - just buy and sell when they say to.
2) Put your money in a managed trading account. Pay somebody else make all the decisions and pull the trigger for you.

For managed accounts and tip services, forexpeacearmy.com has enlightening reviews and performance statistics for several services. Be aware that many such services are scams. forexpeacearmy tries to separate the scams from the legitimate services.

Having said that, I'd be remiss in not pointing out that some people think forexpeacearmy is itself a scam. Google the phrase "forexpeacearmy scam" and make your own judgement.

Lastly, use the internet and find local Meetup groups or Yahoo groups who are focused on Forex. Get together with experienced traders and ask questions there.

But don't expect anybody to hold your hand.

If I read your code correctly, you are looking back over an interval of 5 candles to detect any candles where the high or low is 5 pips higher (or lower) than the current candle. Is that correct? The code line I'm looking at for example, is:
if close[currentbar-5-i]<(close[currentbar]-0.0005) then longallowed:=true;
so I believe "currentbar-5-i" is testing the prior 5 candles.

Please send me a simple copy of it to my email id : [email protected] , I am totally a novice trader , and I use only Mt4 platform. Please help me out I am in a search of a new strategy for scalping coz I have blown $2000 dollars in my live account by following signals and due to swing trades. Plz help me out.
Again my id is : [email protected]

I would be so grateful to you!!Or else recommend me any strategy..

I AM A COMPLETE NOVICE REGARDING FOREX TRADING. MOST OF THE TERMS USED SOUND GREEK TO ME. PLEASE CAN YOU SEND ME A SIMPLIFIED EDITION? MY EMAIL ADDRESS IS: [email protected]

No, this is CTL code for dealbook. Doesn't work on MT4.

Is it a MQ4 code? I'm getting errors and warnings when I tried to compile it on meta editor.

Hi, this strategy is ok for learning and starting with FX. If you are beginner i advice to start on a demo account first. Keep your position size small if you go live. Protecting you capital is essential when you are beginner.

You can ask any question you want to know here on this page. Or if it has nothing to do with this strategy you can contact me by email: [email protected]

I sometimes use this strategy on a live account when i expect a limited number of trend changes in the day. If their are lots of short time frame trend changes you better put this strategy on a hold.

ctlprogrammer

Hi CTLprogrammer - how can i contact you to discuss how to use this strategy? Sounds great, but not sure how to implement it (newbie). Thanks, you can contact me on [email protected]

Hi, I have just started learning about FX. I still have a Demo account. Is this an easy strategy to learn? I don't want to jump around getting confused with all the seemingly thousands of strategies, i want to concentrate on one and learn it well. Do you recommend this one?


Post new comment

CAPTCHA
We read every comment. Proceed if you're a human: