Nanningbob 10.2 auto-trading EA

Share your 10.x automated traders here.
Locked
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

alex_forex wrote:Hi all :)

Some bugs on Friday with V1N (I'll update the EA on my VPS over the Week End)

criminal Alpari UK
Capture1.JPG
Capture2.JPG

Regards
Alex
Hi

"Off Quotes" is not a bug but a message from broker when price quickly move just in time with EA SendOrder. It's often with Demo account, rarely with Live.

Philippe
User avatar
alex_forex
Trader
Posts: 438
Joined: Tue Nov 15, 2011 5:46 pm
Location: F R A N C E

Re: 10.2; the auto-trading EA is born.

Post by alex_forex »

Merci Philippe ;)

But why open/close multiple orders ?
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

alex_forex wrote:Merci Philippe ;)

But why open/close multiple orders ?
cause it's V1N :lol:
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: 10.2; the auto-trading EA is born.

Post by SteveHopwood »

phil_trade wrote:
spotdespot wrote:Thanks for your help with this Philippe. I am still getting the partial close issue - the same as highlighted above. I tried restoring the 2 lines you mentioned (each in 2 places?) but that didn't seem to do the trick. I have tried looking through the code but I am going round in circles.... :(

The last fix for WeeklyDirection worked - thanks.
Below my JumpingStopLoss routine
Version 1t is in post 1. I have replaced the calls to the Slope indi with Paul's function that brings the code in-house. You can ditch your TMA Slope for EA indi.

Philippe, I yelled, "Yippee" when I saw this. The blasted function has been driving me nuts. I have not immediately replace my code with this, because it appears to lose the Stealth capability.

At the mo, we can either have: Phil's code that does not generate the errors but has no Stealth; my code that generates the errors but does not have the Stealth. I will go with the majority, so just tell me what you want.

I have copied Philippe's code into the EA and commented it out - you will find it directly underneath my own code. Those of you who know how can make your own choice through the code editor.

Re this:
The last fix for WeeklyDirection worked - thanks.
What is the fix and to what does it refer, so I can add it?

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

Re this:
The last fix for WeeklyDirection worked - thanks.
What is the fix and to what does it refer, so I can add it?

:D[/quote]

Hi Steve

It's refer to LookForLongTrend(int tf) and LookForShortTrend(int tf)

I have replace

Code: Select all

if (WeeklyDirection <= up) return(false);
with

Code: Select all

if (WeeklyDirection != up) return(false);
and

Code: Select all

if (WeeklyDirection <= down) return(false);
with

Code: Select all

if (WeeklyDirection != down) return(false);
and also you still have a buggy code in CalculateStopLoss and CalculateTakeProfit

Code: Select all

      // Control stop level minima. Provided by Philippe. Thanks, P.
      if (stop > 0 && Bid-stop <= Stoplevel/Point)
      {
         stop = Bid - (Stoplevel*Point);
      }//if (Bid-stop <= Stoplevel/Point)
instead of

Code: Select all

      // Control stop level minima. Provided by Philippe. Thanks, P.
      if (stop > 0 && Bid-stop <= Stoplevel*Point)
      {
         stop = Bid - (Stoplevel*Point);
      }//if (Bid-stop <= Stoplevel*Point)
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

Philippe, I yelled, "Yippee" when I saw this. The blasted function has been driving me nuts. I have not immediately replace my code with this, because it appears to lose the Stealth capability.

At the mo, we can either have: Phil's code that does not generate the errors but has no Stealth; my code that generates the errors but does not have the Stealth. I will go with the majority, so just tell me what you want.
[/quote]

Steve

Can you explain a little bit what is the Stealth capability :oops: As I don't know what it is....I can't check why my code lose it :lol:

Philippe
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: 10.2; the auto-trading EA is born.

Post by SteveHopwood »

phil_trade wrote:Re this:
The last fix for WeeklyDirection worked - thanks.
What is the fix and to what does it refer, so I can add it?

:D
Hi Steve

It's refer to LookForLongTrend(int tf) and LookForShortTrend(int tf)

I have replace

Code: Select all

if (WeeklyDirection <= up) return(false);
with

Code: Select all

if (WeeklyDirection != up) return(false);
and

Code: Select all

if (WeeklyDirection <= down) return(false);
with

Code: Select all

if (WeeklyDirection != down) return(false);
and also you still have a buggy code in CalculateStopLoss and CalculateTakeProfit

Code: Select all

      // Control stop level minima. Provided by Philippe. Thanks, P.
      if (stop > 0 && Bid-stop <= Stoplevel/Point)
      {
         stop = Bid - (Stoplevel*Point);
      }//if (Bid-stop <= Stoplevel/Point)
instead of

Code: Select all

      // Control stop level minima. Provided by Philippe. Thanks, P.
      if (stop > 0 && Bid-stop <= Stoplevel*Point)
      {
         stop = Bid - (Stoplevel*Point);
      }//if (Bid-stop <= Stoplevel*Point)
[/quote]
Thanks Phil.

V 1u is in post 1. I suggest you only download it if you are a weekend backtester. If not, I suggest you wait. For the sake of your sanity, I have adopted Phil's JS code and removed the Stealth capability - saves a gazillion error messages. The Stealth code is still there, but hidden.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: 10.2; the auto-trading EA is born.

Post by SteveHopwood »

Steve

Can you explain a little bit what is the Stealth capability :oops: As I don't know what it is....I can't check why my code lose it :lol:

Philippe
Stealth means the EA draws take profit and stop loss lines on the chart, then moves the 'hard' tp/sl to HiddenPips away from the price. When the market crosses one of the lines, the bot closes the trade. The 'hard' stop is there for security. The purpose is to keep some of your settings secret from the crims and stop the less honest ones from stop hunting.

Tp lines have the prefix TpPrefix, a constant set to "Tp", followed by the ticket number of the trade.
Sl lines have the prefix SlPrefix, a constant set to "Sl", followed by the ticket number of the trade.

There is something in the logic of my code that causes the errors to be generated, and I am buggered if I can work out what. It will be something really simple; it always is.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

SteveHopwood wrote:
Steve

Can you explain a little bit what is the Stealth capability :oops: As I don't know what it is....I can't check why my code lose it :lol:

Philippe
Stealth means the EA draws take profit and stop loss lines on the chart, then moves the 'hard' tp/sl to HiddenPips away from the price. When the market crosses one of the lines, the bot closes the trade. The 'hard' stop is there for security. The purpose is to keep some of your settings secret from the crims and stop the less honest ones from stop hunting.

Tp lines have the prefix TpPrefix, a constant set to "Tp", followed by the ticket number of the trade.
Sl lines have the prefix SlPrefix, a constant set to "Sl", followed by the ticket number of the trade.

There is something in the logic of my code that causes the errors to be generated, and I am buggered if I can work out what. It will be something really simple; it always is.

:D
I have notice this line in your code

Code: Select all

if (sl == 0) sl = MathMin(sl, OrderOpenPrice())
that always return 0. May be it's where the devil sleep ? :twisted:
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

phil_trade wrote:
SteveHopwood wrote:
Steve

Can you explain a little bit what is the Stealth capability :oops: As I don't know what it is....I can't check why my code lose it :lol:

Philippe
Stealth means the EA draws take profit and stop loss lines on the chart, then moves the 'hard' tp/sl to HiddenPips away from the price. When the market crosses one of the lines, the bot closes the trade. The 'hard' stop is there for security. The purpose is to keep some of your settings secret from the crims and stop the less honest ones from stop hunting.

Tp lines have the prefix TpPrefix, a constant set to "Tp", followed by the ticket number of the trade.
Sl lines have the prefix SlPrefix, a constant set to "Sl", followed by the ticket number of the trade.

There is something in the logic of my code that causes the errors to be generated, and I am buggered if I can work out what. It will be something really simple; it always is.

:D
I have notice this line in your code

Code: Select all

if (sl == 0) sl = MathMin(sl, OrderOpenPrice())
that always return 0. May be it's where the devil sleep ? :twisted:
One other thing :

In your JumpingStopLoss() you move Line only if HiddenPip >0 but you do move the SL every time

Code: Select all

if (HiddenPips > 0) ObjectMove(LineName, 0, Time[0], NewStop);
So there is a pingpong with AdjustStopLoss() which remove SL to the line value :geek:
Locked

Return to “10.x EA forum”