Forex Zone - Forex Forum

Ea required on RSI

Discussion started on New EA Coding

  • Jr. Member
  • Posts: 77
  • Points: 246
  • Likes Received: 19
  • Reputation: +2/-0

            The ea is working fine now, thanks
#16 - August 06, 2024, 06:29:21 AM

  • Jr. Member
  • Posts: 77
  • Points: 246
  • Likes Received: 19
  • Reputation: +2/-0

         The EA is working fine. Thanks again for your hard work. one thing which i want to add if it is possible to stop trading of ea if it reaches certain number of losses. For example, ea place one trade and hit sl and then doubles the volume, this practice continues until we have a winning trade, so my goal is to set a maximum number of iteration after which ea will stop trading.  e.g. if we set this number to 5,  then after five consective losses, ea should stop working. thanks
#17 - October 14, 2024, 04:59:34 AM

Administrator
  • Hero Member
  • Posts: 5121
  • Points: 29380
  • Likes Received: 5123
  • Reputation: +220/-14
Attached is the updated version FZ RSI Martingale EA v1.30

A new setting has been added called '# Consecutive SL Trades Before Stopping'. It is used whenever 'Stop After SL?' is true.

For example, if you set the new setting to 5 and there are 5 consecutive stop losses in a row since last EA initialization then the EA will suspend trading. You will see a comment in the upper left corner of the chart telling you to restart the EA. Once you manually restart the EA, the cycle starts again. And so on.

Notes:
  • This feature only considers consecutive SL's. So if there is a TP or manually closed trade, it will affect the count of consecutive SL's the EA sees.
  • This new setting uses the last EA initialization time. Not the new day of the broker and not the new day in your local time. So you have to manually choose when to restart the EA and it starts again from that point.

#18 - October 14, 2024, 10:36:05 PM
Attachments:

Ea required on RSI in New EA Coding_topic=585

  • Jr. Member
  • Posts: 77
  • Points: 246
  • Likes Received: 19
  • Reputation: +2/-0
Hi, thanks for your efforts, the ea (ver 1.3) is working fine, Just want to add one more thing.   The ea should start at a particular time, means there should be an input for time (date, hours, minutes) , at which ea will initialize and start working, rest functionality remains the same.

                 thanks for your cooperation
#19 - October 21, 2024, 01:58:15 AM

Administrator
  • Hero Member
  • Posts: 5121
  • Points: 29380
  • Likes Received: 5123
  • Reputation: +220/-14
Attached is the updated version FZ RSI Martingale EA v1.40

A new Timer section has been added in the inputs. A new cycle of trades can only open within the allowed times, if enabled.

Notes:
  • You should use the same format as the default settings. For example, "9.00" and "9,00" are not the same as "9:00".
  • If there is still a trade open past the end timer, it will continue to remain open to hit TP/SL as normally. The timer only prevents a new trade(s) from occurring.
  • Setting the timer to false will totally disable the timer and is like running the version 1.30.
#20 - October 23, 2024, 01:19:09 AM
Attachments:

  • Jr. Member
  • Posts: 77
  • Points: 246
  • Likes Received: 19
  • Reputation: +2/-0
          Hi, thanks for your efforts, one thing, when i set the ea to start from the next day and entered value as 02:00 as start time, it  places trade immediately, however i want it to open trade the next day so i think a date input should also be present so that this confusion can be overcome.    Also at    "End Time"  only present trade is closed, what I want, at end time, present cycle  should be finished. For example if  end time is 17:00 and at that time  a trade  of 0.04 lot size is running then it should not stop until a TP is hit.  So  i want ea to complete that trade cycle and not only that trade. 
Thanks again for your cooperation
#21 - October 23, 2024, 07:15:15 AM
« Last Edit: October 23, 2024, 07:38:03 AM by johnplayer102 »

Administrator
  • Hero Member
  • Posts: 5121
  • Points: 29380
  • Likes Received: 5123
  • Reputation: +220/-14
when i set the ea to start from the next day and entered value as 02:00 as start time, it  places trade immediately, however i want it to open trade the next day so i think a date input should also be present so that this confusion can be overcome.
if you start the EA when the current time is in the middle of the time period already, I can simply make the EA to wait until next time. There is no need to add complexity to the inputs just to do this small thing.

Also at    "End Time"  only present trade is closed, what I want, at end time, present cycle  should be finished. For example if  end time is 17:00 and at that time  a trade  of 0.04 lot size is running then it should not stop until a TP is hit.  So  i want ea to complete that trade cycle and not only that trade.
Here is where it doesn't make sense to me. For a couple reasons. Here is what you said by PM:

The ea should start at a particular time, means there should be an input for time (date, hours, minutes) , at which ea will initialize and start working, rest functionality remains the same.

and then when I asked about an end time, you said this:

The current option in ea to close when it hits certain number of profits should also be  bypassed if end time is remaining. let's suppose ea start at day start i.e. 05:00 am and I have set the end time at 15:00 am( time shown by the metatrader 4) then at 15:00 it will complete its current cycle and will not enter new cycle regardless of number of take profits it had  hit.


So the EA was made to agree with those 2 statements. So let's say you have have the '# TP Trades Before Stopping' set to 2. Let's say by 14:59 one TP was hit. So another trade is made since it's still before the end time. The next trade hits SL past the end time. So regardless of number of TPs hit, the EA stops trading. This is what you said and is how the EA works now. It also agrees with your original statement that the rest of the functionality remains the same. So the current version seems to agree 2x with what you said.

Now you said this:
Also at    "End Time"  only present trade is closed, what I want, at end time, present cycle  should be finished. For example if  end time is 17:00 and at that time  a trade  of 0.04 lot size is running then it should not stop until a TP is hit.  So  i want ea to complete that trade cycle and not only that trade.

I just want to note that this way doesn't disregard number of TPs hit. So it disagrees in my opinion.

Okay, so let's talk about this some more though. I understand now how you define a "cycle". In my mind, when you mentioned cycle before it meant either the TP requirement was met or SL requirement was met. You think of a cycle as a single TP being hit, even if you set the input to 2 TPs or more. So just to be clear, your intended modification will mean a trade must hit TP after the end timer or else the cycle is not complete. In this case, the timer will almost certainly always be disregarded. Let's say the timer is set 05:00 to 15:00. At 15:00, there was no TP's hit yet. So in your mind, the cycle is still open. So at 15:01 (past the end time), a trade must be opened and the timer disobeyed. That trade closes by SL too at 17:00. Another trade then opens (again past the end time) since the cycle is still open. That trade hits SL at 20:00. And so on. This will continue until a TP is hit (assuming max SLs not reached), which may never happen at all or will happen well past the end time at least. The EA will totally disregard the end time like this every time. I can make it like that, but just as long as you know the end time will not be obeyed.
#22 - October 23, 2024, 03:38:01 PM

  • Jr. Member
  • Posts: 77
  • Points: 246
  • Likes Received: 19
  • Reputation: +2/-0

           Okay,  You are right. Leave the end time,  I just want to start ea  at the start of the day (mt4 time) , so how should i set the strat time, thanks
                                                 
#23 - October 23, 2024, 04:03:31 PM

Administrator
  • Hero Member
  • Posts: 5121
  • Points: 29380
  • Likes Received: 5123
  • Reputation: +220/-14
           Okay,  You are right. Leave the end time,  I just want to start ea  at the start of the day (mt4 time) , so how should i set the strat time, thanks                       
The EA can be changed so that if you start it in the middle of the allowed time period, it will skip this and wait for the beginning of the new day before starting. Or you can just start the EA outside the allowed time period and it would do this automatically. Just let me know.
#24 - October 23, 2024, 04:22:12 PM

  • Jr. Member
  • Posts: 77
  • Points: 246
  • Likes Received: 19
  • Reputation: +2/-0
The EA can be changed so that if you start it in the middle of the allowed time period, it will skip this and wait for the beginning of the new day before starting. Or you can just start the EA outside the allowed time period and it would do this automatically. Just let me know.

    I just want ea to start at the start of day. So that i want to add date function.  In this way i would be able to set start time as date: 25.10.2024   & time :  02:05. So ea will start exactly after 05 minutes of day start.
                                                                    thanks for your cooperation
#25 - October 24, 2024, 12:34:11 AM

Administrator
  • Hero Member
  • Posts: 5121
  • Points: 29380
  • Likes Received: 5123
  • Reputation: +220/-14
    I just want ea to start at the start of day. So that i want to add date function.  In this way i would be able to set start time as date: 25.10.2024   & time :  02:05. So ea will start exactly after 05 minutes of day start.
I understood this already. What I've been trying to tell you is that it can be automated with no added complexity to user inputs. So if you start the EA in the middle of the allowed times, it will simply wait until the next time the timer is active again. If you really want to add the date to the inputs, fine, but it doesn't seem necessary.
#26 - October 24, 2024, 12:52:56 AM

  • Jr. Member
  • Posts: 77
  • Points: 246
  • Likes Received: 19
  • Reputation: +2/-0
ok,   I got it, I will try and then update you
                       Thanks again for your patience
#27 - October 24, 2024, 03:46:41 AM
« Last Edit: October 24, 2024, 04:40:13 AM by johnplayer102 »

Administrator
  • Hero Member
  • Posts: 5121
  • Points: 29380
  • Likes Received: 5123
  • Reputation: +220/-14
Attached is the updated version FZ RSI Martingale EA v1.41

Now, if you start the EA within the allowed times already, it will wait for the next trading session.
#28 - October 24, 2024, 01:08:59 PM
Attachments:

  • Jr. Member
  • Posts: 71
  • Points: 270
  • Likes Received: 25
  • Reputation: +0/-0
is this possible for all brokers
#29 - October 28, 2024, 04:06:01 AM

Administrator
  • Hero Member
  • Posts: 5121
  • Points: 29380
  • Likes Received: 5123
  • Reputation: +220/-14
is this possible for all brokers
It should work on any MT4 broker the same.
#30 - October 28, 2024, 11:12:04 AM

Members:

0 Members and 1 Guest are viewing this topic.