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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Resetting EA 6 replies

Resetting MT4 EA Parameters through code 5 replies

Indicator Resetting 15 replies

resetting balance 2 replies

Resetting Market Watch to local Time 1 reply

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 1
Attachments: Resetting EA
Exit Attachments
Tags: Resetting EA
Cancel

Resetting EA

  • Post #1
  • Quote
  • First Post: Oct 2, 2017 8:18am Oct 2, 2017 8:18am
  •  Lenny154
  • | Joined Jan 2017 | Status: Member | 11 Posts
Hi FF Community!

I have a question. I created an EA based on Martingale and it is working pretty good for now. The thing is: I closed all of my trades on friday and reopened mt4 this morning and the EA kept trading with the multiplied lotsize. I would like to reset the EA every monday so that it starts with the initial lotsize. Does anyone know how to do that?

Thanks in advance

Lenny
  • Post #2
  • Quote
  • Oct 2, 2017 10:05am Oct 2, 2017 10:05am
  •  FerruFx
  • Joined May 2007 | Status: MT4/MT5 EAs/Indicators/Alerts coder | 6,423 Posts | Online Now
If you coded the EA with a magic number ... then each monday set a new unused magic so the EA won't see the previous orders from the previous week.
MT4/MT5 EAs/Indicators/Alerts coder
 
 
  • Post #3
  • Quote
  • Oct 2, 2017 10:15am Oct 2, 2017 10:15am
  •  Lenny154
  • | Joined Jan 2017 | Status: Member | 11 Posts
Quoting FerruFx
Disliked
If you coded the EA with a magic number ... then each monday set a new unused magic so the EA won't see the previous orders from the previous week.
Ignored
Ok. Cool. Thank you very much.

Lenny
 
1
  • Post #4
  • Quote
  • Oct 2, 2017 11:36am Oct 2, 2017 11:36am
  •  FerruFx
  • Joined May 2007 | Status: MT4/MT5 EAs/Indicators/Alerts coder | 6,423 Posts | Online Now
Quoting Lenny154
Disliked
{quote} Ok. Cool. Thank you very much. Lenny
Ignored
MT4/MT5 EAs/Indicators/Alerts coder
 
 
  • Post #5
  • Quote
  • Oct 6, 2017 10:38pm Oct 6, 2017 10:38pm
  •  jamgojo
  • | Joined Oct 2010 | Status: Member | 10 Posts
Modification please.

This EA sets Sell Stop & Buy Stop at specific time hour & minute.

I want this EA to set Sell Limit & Buy Limit instead at specific hour, minute & second. I would also like to have Trailing Stop settings among the input options please.
Attached File(s)
File Type: mq4 Open pending OCO BUY SELL Orders at SET hour min GBP9AM EA.mq4   8 KB | 182 downloads
 
 
  • Post #6
  • Quote
  • Last Post: Oct 7, 2017 8:32pm Oct 7, 2017 8:32pm
  •  hamidrezamf
  • | Joined Sep 2009 | Status: Member | 13 Posts
Quoting Lenny154
Disliked
Hi FF Community! I have a question. I created an EA based on Martingale and it is working pretty good for now. The thing is: I closed all of my trades on friday and reopened mt4 this morning and the EA kept trading with the multiplied lotsize. I would like to reset the EA every monday so that it starts with the initial lotsize. Does anyone know how to do that? Thanks in advance Lenny
Ignored
if you have open source file use this code to automatic operation :
if (OrdersTotal()==0) Lotage=Initial_Lot;

notice :
1) Initial_Lot is an external input for initial lot...if there is not any input like this , create it yourself :
extern double Initial_Lot=0.1;

2) Lotage is a variable that is set in OrderSend() function in your EA...find it in your code and use that exactly

3) this code operates fine if you close all positions on Friday as you said
regards
 
 
  • Platform Tech
  • /
  • Resetting 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