Forex Zone - Forex Forum

Simple system

Discussion started on New EA Coding

  • Jr. Member
  • Posts: 62
  • Points: 0
  • Likes Received: 14
  • Reputation: +1/-0
Hi Francois, 

It was good to see the beginnings of my strategy taking place, I am very pleased with the effort you are putting in.

Obviously, I am not your client and am not expecting you to work to a deadline... There is no rush and I appreciate you taking this project on at all.

One thought crossed my mind when I saw it in action, would it be easier for the ea to place x amount of stop orders immediately upon starting rather than adding them as the price moves?I

T
#31 - January 04, 2019, 05:51:09 PM

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
Yes, I can do that.
Will change it
#32 - January 04, 2019, 06:36:47 PM

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
I have not forgotten about you, I am just busy with quite an involved EA at the moment, when I am done with it, I will continue with yours
#33 - January 07, 2019, 09:11:37 PM

  • Jr. Member
  • Posts: 62
  • Points: 0
  • Likes Received: 14
  • Reputation: +1/-0
No problem.
#34 - January 07, 2019, 09:51:13 PM

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
I will continue on your EA from tomorrow.
#35 - January 10, 2019, 01:05:30 AM

  • Jr. Member
  • Posts: 62
  • Points: 0
  • Likes Received: 14
  • Reputation: +1/-0
Thank you, any questions just let me know.
#36 - January 10, 2019, 03:00:16 AM

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
Hi Tony
Here is Beat version 1.1.
It now place the Buy_Stops and Sell_Stops (As many as you selected in the inputs under Max_Buys and Max_Sells) immediately when there are no pending buy or sell orders all at once (Buy_Stops only when there are no buy pending orders and vica versa)

It will also modify the pending orders when one of the opposite orders were triggered.

Please see if this is what you had in mind, again, on a DEMO acc or strategy tester please, there is still no closing functions, so it won't close any trades, this is just to see if you are happy with the way it places orders and modify them.

I can only include the closing functions once I know EXACTLY where and when to close the trades.
#37 - January 11, 2019, 12:16:36 AM
Attachments:

  • Jr. Member
  • Posts: 62
  • Points: 0
  • Likes Received: 14
  • Reputation: +1/-0
Hi francois, thanks for your latest version. I've put it on a chart to see what it is doing... Initially, although the buys and sells were set at 3 it opened 3 buys but only 2 sells. I'll report more later.

Edit. I've loaded it again, this time 3 and 3. On first chart I notice one of the arrows is black... If that answers why it opened only 2.
#38 - January 11, 2019, 11:05:38 AM
« Last Edit: January 11, 2019, 11:20:47 AM by Blanco »

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
A black arrow is a modified order, that means an opposite order was triggered and the black arrow was modified to the current price + or - the X-Diff.
#39 - January 11, 2019, 01:58:47 PM

  • Jr. Member
  • Posts: 62
  • Points: 0
  • Likes Received: 14
  • Reputation: +1/-0
Ok, it's running on metaquotes demo 42326498 j5oaygt . It doesn't seem to be moving the buystops up any more and some are at the same price. I have been away so the pc has been offline in the middle of the test if that has anything to do with it.
#40 - January 11, 2019, 03:05:55 PM

Administrator
  • Hero Member
  • Posts: 5113
  • Points: 29360
  • Likes Received: 5122
  • Reputation: +220/-14
It doesn't seem to be moving the buystops up any more and some are at the same price. I have been away so the pc has been offline in the middle of the test if that has anything to do with it.
An EA can't move buystops or any trade operation if it is not online and connected to the broker.
#41 - January 11, 2019, 03:11:13 PM

Simple system in New EA Coding_topic=585

  • Jr. Member
  • Posts: 62
  • Points: 0
  • Likes Received: 14
  • Reputation: +1/-0
Hi admin, I know I didn't help matters by going out and taking the internet with me. I knew that the ea would not work while I was away... I assumed that when back in range it would start to calculate again.
#42 - January 11, 2019, 03:14:54 PM

  • Jr. Member
  • Posts: 62
  • Points: 0
  • Likes Received: 14
  • Reputation: +1/-0
The exit strategy for each trade is the same mechanism used in cancelling and replacing the pending orders.

So, say we are two either side with a 50 gap and the price has been rising, the pending orders have been following.

Buy 1.0550  (+350)
Buy 1.0500.  (+400)
Price 1.0900
Sellstop 1.0850
Sellstop 1.0800

The price reverses

Buy 1.0550  (+250)
Buy 1.0500  (+300)
Price 1.0800
Sell 1.0850  (+50)
Sell 1.0800  (0)

When it reverses to a point that we need to follow with a pending order the the furthest away buy in the example has to be exited to maintain the balance of orders either side.

Buy 1.0550  (+200) (cashed in when new buystop triggered)
Buy 1.0500  (+250)
Buystop 1.0800 (activated when our nearest sell hit 50 pip gap)
Price 1.0750
Sell 1.0850  (+100)
Sell 1.0800  (+50)

If the price continued to 1.0700 then the other market buy is cashed in and replaced with a another buystop at 1.0750

I hope this explains it. T
#43 - January 12, 2019, 02:05:10 PM
« Last Edit: January 12, 2019, 02:06:41 PM by Blanco »

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
This makes it easier. 
I will work on it.
#44 - January 12, 2019, 05:23:30 PM

  • Jr. Member
  • Posts: 62
  • Points: 0
  • Likes Received: 14
  • Reputation: +1/-0
I'm happy about that, I didn't know whether that could be coded.
Thanks again for your time and effort.
#45 - January 12, 2019, 05:48:31 PM

Members:

0 Members and 1 Guest are viewing this topic.