• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 1:56pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 1:56pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Follow the BIG Candle 320 replies

Follow the prior Heiken Ashi candle for profits 61 replies

How to make EA that send Open Price of Candle for every new candle 5 replies

Day's first H4 candle correlation to daily candle 14 replies

Correlation between first 4 hour candle and daily candle 1 reply

  • Trading Systems
  • /
  • Reply to Thread
  • Subscribe
  • 3
Attachments: Follow Last Candle EA
Exit Attachments
Tags: Follow Last Candle EA
Cancel

Follow Last Candle EA

  • Post #1
  • Quote
  • First Post: Edited Jul 22, 2019 3:16pm Apr 13, 2019 9:35am | Edited Jul 22, 2019 3:16pm
  •  Joku
  • | Joined Sep 2018 | Status: Member | 6 Posts
First of all: I will update this initial Post (if possible) to keep it up to date.

The Follow Last Candle EA was made as a reaction to Robinho's "Follow the monthly candle and be profitable"-Thread.
When I first heard about this trading strategy, I doubted about it's efficiency. But because of it's simple ruleset, I decided to make an EA to backtest it.

Although I saw pretty promising backtest results, testing it forward showed me quite different results.

However, if you're up to try a similar strategy, here is what you can do with this EA:

  1. Open pending Orders in direction of the last Candle (Follow last Candle)
  2. Follow the last Candle, but only if the candle-body is big enough (e.g. bigger than 70% of whole candle size)
  3. Follow the last Candle, but only if last Candle in a bigger Timeframe went into the same direction
  4. Follow the last Candle, but only if last Candle in a bigger Timeframe went into same direction AND had a big enough candle-body as well
  5. Setting pending Orders into both directions (e.g. above and below the last candle)
  6. Setting pending Orders only at a specific day/time (e.g. only on Thuesday between 1AM and 7AM)
  7. Money Management settings (Fixed Lot size or maximum percentage of risk)



Settings

TRADE OPTIONS
TradeComment
This will be added to every Trade placed by the EA. It will be visible in the Trading History.

TradingFrequency
Your trading Timeframe. Trades will be placed according to this Timeframe.
Possible Settings are: Daily, Weekly, Monthly

BiggerTimeframe
The bigger Timeframe you refer to if necesary.

For Example: If you want to follow the daily candle, but only if the monthly Candle has the same direction, then you have to set the Options like this:
TradingFrequency = Daily
BiggerTimeframe = Monthly
TradingStyle = "follow last Candle if bigger Timeframe has same direction"

Possible Settings are: Daily, Weekly, Monthly

ReferencePrice
Here you can choose what exact price you refer to when placing a new pending order.
Possible Settings are:

  1. Last Candle's Close
  2. Current Candle's Open
  3. Current Price (Bid=Short, Ask=Long)
  4. Last Candle's High and Low
  5. Current Candle's High and Low


TradingStyle
Possible Settings are:

  1. follow Last Candle
    Sets a pending Order in the direction of the last candle.
  2. follow last bigger Timeframe
    Sets a pending Order in the direction of the last candle in the bigger Timeframe.
    For example: BiggerTimeframe = Monthly, TradingFrequency = Daily. If the last Monthly candle was Long, now you get a new pending Long Order every day.
  3. follow last Candle if bigger Timeframe has same direction
    Sets a pending Order in the direction of the last candle, but only if it's in the same direction like the last candle of the bigger Timeframe.
  4. Place Short and Long, trade first hit only (Not Implemented!)
    I didn't had the time to finish this Option.
  5. Place Short and Long, trade both
    This Option places pending Orders in both directions.


Adjust Price if necesary with
Sometimes it's not possible to open a pending Order due to Gaps. Here you can define if it should adjust the reference Price in such a case.
Possible Settings:

  1. Don't adjust Price
  2. Current Candle's Open
  3. Current Price (Bid=Short, Ask=Long)
  4. Current Candle's High and Low


Format of SL, TP and PointsAway
It's necesary to know the amount of digits after the comma of the price. But the EA should recognise it automatically. However, if you experience that your TP and SL are far away from what they should be, then it might be necesary to adjust this option manually.

"TP", "SL" and "PointAway"
Take Profit (TP) and Stop Loss (SL) should be clear.
"PointAway" defines how many Points away from the reference Price new pending Orders will be placed.
For Example: A Long-Trade with ReferencePrice "Last Candles High Low" and a PointAway of 10 will place the pending order 10 points above last Candle's High. This could avoid that your Order is activated by just one Pip.

MinCandleBodyPercent and MinBiggerTFBodyPercent
Here you can define a minimum % for the last Candle's Body Size. Like this you can avoid getting trapped by candles with no clear direction.

Expiracy in Minutes for pending Orders
If you want pending Orders not to exist forever, here you can set an amount of Minutes to remove them if they didn't got activatet until then.

WaitForNextCandleToPlaceTrade
This option causes the EA to wait with opening Orders until a new Candle starts on the Trading Timeframe. The default Value is set to "True" and causes the EA not to directly place an order right after activating the EA. It's an important option for live accounts and it's meant to have this behaviour!
So, if you want the EA to place Orders right when you activate it, then you have to set this Option to "False"!!!


MONEY MANAGEMENT
UseFixedOrderSize
Use "True" if you want to have a fixed Order Size.
Use "False" if you want to use a dynamic Lot Size calculated by the EA (according to your account Equity).

FixedOrderSize
If you use a fixed lot size, you can set the lot size here.

PercentOrderSize
If you use dynamic Lot Size, here you can set a percentage of the Account Equity to use for your SL.

MinOrderSize and MaxOrderSize
Manually set the minimum and the maximum Lot Size. It only applies if you set the next option to "False".

GetMinMaxLotsFromBroker
If "True", the EA will get the minimum and maximum Lot Size for the current Chart from the Broker.

RoundLotSize
If you use dynamic Lot Size, here you can choose whether you'd prefer to round the calculated Lot Size up or down.
Why? Because you can't trade a 0.018472 Lot and the EA has to decide if it takes 0.01 or 0.02. This can make a big difference.
Possible Settings: RoundUp, RoundDown, RoundUpOrDown


EA SETTINGS
ExecuteEAOn
Defines if the EA is getting executed on every Tick or in at regular interval.
Possible Options: Tick, Timer

TimerInSeconds
Here you set the interval in seconds if you want to execute the EA on "Timer".

MagicNumberOffset
The EA has a really ugly way of recognising Short and Long Trades; It just gives them Magic Numbers of 100 and 1000. If this interferes with another EA you have, you can change the Magic Numbers by adding the MagicNumberOffset to them.

ReplaceOrder
You most probably want to have this Option turned off. If it's turned on it won't place a new pending order if there's already an active pending order.

MaxSlippage
Sets the maximum of Slippage allowed. Be aware that this function may not work if your Broker does not support it (i.E. Brokers default method is Market execution)

SupportECNBrokers
If set to "True" SL and TP will be set separately after placing the order to support ECN brokers.


MARKET HOURS
UseManualMarketHours
Set it to "True" if you want to use manual trading hours.
Important: The Format must be exactly "00:00-00:00", or the EA will exit on startup with an error message.

DEBUG MESSAGES
Debug Messages are helping to understand what the EA was doing if something didn't get executed as expected. You can see them in the "Experts"-Tab of the Terminal.
I strongly recommand not to turn on PrintStillAliveMessage if the EA is getting executed on every Tick. It would try to write a Message on every Tick and could slow down your computer significantly.




BTW: The whole EA is based on another EA with really old legacy code, which was pretty annoying to work with.
I plan to make a new EA from scatch with a maintainable codebase in the next months. But I can't promise it for sure because my life is full of uncertainty.

And also I'm just aware of one unimportant bug in the latest version, USE AT YOUR OWN RISK AND IN DEMO ONLY, I reject any responsability for what you are doing with it!

Attached File(s)
File Type: ex4 Follow last Candle (v1.2.13).ex4   127 KB | 1,774 downloads
  • Post #2
  • Quote
  • Apr 13, 2019 10:29am Apr 13, 2019 10:29am
  •  dicojoxaftr
  • | Commercial Member | Joined Nov 2018 | 288 Posts
 
 
  • Post #3
  • Quote
  • Oct 24, 2019 5:46pm Oct 24, 2019 5:46pm
  •  tony01000
  • | Joined Oct 2019 | Status: Junior Member | 1 Post
I would suggest code EA to trade with last candle close by checking LAST hourly (H1) candle whether BULL or BEAR.

The EA should open the orders at opening of markets 00:00GMT (because of night spreads instead of opening immediately) but follow 21:00GMT LAST HOUR CANDLE CLOSE direction.
If bull it will buy and ifbear candle it will sell.

TP should be 20pip and SL 500pips.
It will work with any forex currency pair, Oil and Metals.

Example profit projection.
So, if EA place 20 pairs each 20pips with a leverage of 1:1,000 it will be
20*20=400pips a day.
400pips and using 0.01 lot for each trade gives you $40 with leverage above.

p.s: Attached example.
Attached Images
 
 
  • Post #4
  • Quote
  • Oct 24, 2019 7:39pm Oct 24, 2019 7:39pm
  •  trieuVhh
  • Joined Feb 2019 | Status: (っ.❛ ᴗ ❛.)0 | 178 Posts
Quoting tony01000
Disliked
I would suggest code EA to trade with last candle close by checking LAST hourly (H1) candle whether BULL or BEAR. The EA should open the orders at opening of markets 00:00GMT (because of night spreads instead of opening immediately) but follow 21:00GMT LAST HOUR CANDLE CLOSE direction. If bull it will buy and ifbear candle it will sell. TP should be 20pip and SL 500pips. It will work with any forex currency pair, Oil and Metals. Example profit projection. So, if EA place 20 pairs each 20pips with a leverage of 1:1,000 it will be 20*20=400pips a...
Ignored
Why people are so greedy? Lol
 
 
  • Post #5
  • Quote
  • Nov 27, 2019 3:52am Nov 27, 2019 3:52am
  •  Toppi
  • Joined Jul 2015 | Status: DemoMeister | 185 Posts
Hi! Is anyone who uses this EA?
 
 
  • Post #6
  • Quote
  • Apr 26, 2020 6:22pm Apr 26, 2020 6:22pm
  •  mfwillylim
  • | Joined Apr 2020 | Status: Junior Member | 1 Post
I am interested to use this in live. Can you release the live version?
 
 
  • Post #7
  • Quote
  • May 3, 2020 9:47am May 3, 2020 9:47am
  •  Cousupp
  • | Joined Jan 2020 | Status: Member | 9 Posts
Such a bad EA
 
 
  • Post #8
  • Quote
  • Jun 6, 2020 4:37pm Jun 6, 2020 4:37pm
  •  Joku
  • | Joined Sep 2018 | Status: Member | 6 Posts
Quoting mfwillylim
Disliked
I am interested to use this in live. Can you release the live version?
Ignored
There is no restriction. If I remember right there's still a warning message about testing version or so, but I think I removed the limitation because I was not sure if I ever will make another version
 
 
  • Post #9
  • Quote
  • Jul 1, 2020 8:00am Jul 1, 2020 8:00am
  •  welly8662
  • | Joined Oct 2018 | Status: Member | 5 Posts
Hi,Thank you for your sharing.
by the way,I have an idea if you can make it?
I would like at beginning of every new bar to open a "buy limit" apart from X pips of new bars opening price. then when the next following new bar open,the previous bar's buy limit been deleted automatically. and open another buy limit according the new bar's open price.(X pips away from new bar's begin price). all this in 1 minute chart mode to run. program run from 01:00am to 02:00am. no SL TP or anything else necessary.
Do you think it's possible to make? I will pay for this if you can. Thanks!
 
 
  • Post #10
  • Quote
  • Nov 6, 2020 11:26am Nov 6, 2020 11:26am
  •  ronald_fsm
  • | Joined Jun 2009 | Status: Member | 365 Posts
Quoting Joku
Disliked
First of all: I will update this initial Post (if possible) to keep it up to date. The Follow Last Candle EA was made as a reaction to Robinho's "Follow the monthly candle and be profitable"-Thread. When I first heard about this trading strategy, I doubted about it's efficiency. But because of it's simple ruleset, I decided to make an EA to backtest it. Although I saw pretty promising backtest results, testing it forward showed me quite different...
Ignored

Is this EA still working ?
 
 
  • Post #11
  • Quote
  • Last Post: Apr 12, 2021 6:46am Apr 12, 2021 6:46am
  •  ali.khha
  • | Joined Nov 2020 | Status: Member | 3 Posts
hi guys
I need an expert with these details:

in a long position, when a candle closed upper than my stop loss, so close the position and
in a short position, when a candle closed lower than my stop loss, so close the position
 
 
  • Trading Systems
  • /
  • Follow Last Candle EA
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023