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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Very simple EA open trade at open of next candle 3 replies

EA to open trade on Next Candle open (help please) 4 replies

Every new candle a new order - EA 3 replies

Is there an indicator that copies the screen at open of every candle? 8 replies

Send auto email every X period from Excel 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
Tags: How to make EA that send Open Price of Candle for every new candle
Cancel

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

  • Post #1
  • Quote
  • First Post: Edited 2:41am Nov 24, 2008 12:30am | Edited 2:41am
  •  mbah_sangkil
  • | Joined May 2007 | Status: Member | 52 Posts
Hello, how to make an EA that send email contains Open Price of a candle when the new candle come up? I've made but everytime the price change, the EA send email. I want to make the EA send base on time frame. For example, if I put EA on M15, then it will send email and inform Open Price every 15 minutes. Thanks
  • Post #2
  • Quote
  • Nov 24, 2008 2:41am Nov 24, 2008 2:41am
  •  mbah_sangkil
  • | Joined May 2007 | Status: Member | 52 Posts
HELP....!!!!!!!!!!
 
 
  • Post #3
  • Quote
  • Nov 24, 2008 10:59am Nov 24, 2008 10:59am
  •  lohikeitto
  • | Joined Nov 2008 | Status: Member | 41 Posts
Hi mbah_sangkil,

I think it will work if you put this condition before Sendmail Order.

if (Volume[0] == 1)

"Volume[i] == 1" means first tick of the bar i. (and bar 0 means current bar)

If you want it to be timeframe independent, You can use iVolume() instead of Volume[].

iVolume(Symbol(), TimeFrame, i)
 
 
  • Post #4
  • Quote
  • Nov 24, 2008 4:19pm Nov 24, 2008 4:19pm
  •  codobro
  • | Joined Oct 2008 | Status: Member | 81 Posts
Hello,

lohikietto, that is a different way to do it, and mimics a FirstTickOfBar that other platforms use.

Another more common way would be to set a boolean value and have it reset every bar.

And another different way is to use Open[i]. Since the bar will have only 1 open (compared to x close values until the bar completes), you can send a mail on the open of each new bar.

In coding there are many ways to do the same function. Pick one that works best for your EA.
 
 
  • Post #5
  • Quote
  • Nov 24, 2008 6:46pm Nov 24, 2008 6:46pm
  •  lohikeitto
  • | Joined Nov 2008 | Status: Member | 41 Posts
Thanks codobro,

I have found a code posted by Ronald Raygun (at the thread "MAs at newbar..." or something) and thought it to be most sophisticated way to do it.

int CurrentBar;

int init()
{
CurrentBar = Bars;
return(0);
}

int start()
{
if(CurrentBar != Bars)
{
SendMail("","");
CurrentBar = Bars;
}
return(0);
}

Although I've never used it, there is iBars() for TF & Symbol independent.
 
 
  • Post #6
  • Quote
  • Last Post: Nov 27, 2017 7:02am Nov 27, 2017 7:02am
  •  Gadge007
  • | Commercial Member | Joined Aug 2016 | 32 Posts
Does anyone know how to lock an ea ? need help asap
 
 
  • Platform Tech
  • /
  • How to make EA that send Open Price of Candle for every new candle
  • 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