stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

TMA_CG: EA to buy at support & sell at resistance
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3372
Page 9 of 30
Author:  SpiderX [ Wed Jan 15, 2014 12:35 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

Hi Geges,

There was a report of some lot size issue by someone earlier....
until we find the gremlin responsible for this, it might be kinder on your live account to hold off trading live for a while. :)

Cheers
Author:  Geges [ Wed Jan 15, 2014 12:51 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

Hi SpiderX,

Ok-10-4 on that...

I guess I didn't acknowledge the gremlin as I should...

A $ saved is a $ earned :P
Author:  dudest [ Wed Jan 15, 2014 10:37 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

bazze » Tue Jan 14, 2014 4:53 pm wrote:I opened a new demoacc. with a new broker,using the last version of the EA.
I run it OOTB.
There must be something wrong? It opened it's first tade with lotsize 50 :shock:

I run the previous version on another broker,and it's doing just fine :clap:
For now it has closed a total of 10 trades,7 wins(+$342.33) and 3 losses(-$160.20)
One trade still open at +$17...
I run it with lotsize 0.1...
Edit: Last trade closed with a profit of $26.60 :yahoo:
That's....weird.

What happened with the next trades? Were they opened with correct lotsize?

[ Of course, the logic of the EA is fixed, the only variance variable are the Account Balance and Tick Value (from the broker) ]

PLEASE gimme more info /details bazze, would like to check this further (e.g broker, experts logfile, etc)

Cheers
Author:  dudest [ Wed Jan 15, 2014 10:39 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

bazze » Tue Jan 14, 2014 5:50 pm wrote:Yeah,that's true...Luckely it turns out to be a winner :yahoo:
Do you have any idea why this is happening?
With the limited info you provided (actually, singular info), I'd need to be a *mind reader* to know why it's happening (!!) :)

More details please: experts log, journal log ( FROM Empty4 ), broker info, a chart or two (showing on-screen comments), etc....

Cheers
Author:  dudest [ Wed Jan 15, 2014 10:49 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

varso » Tue Jan 14, 2014 6:16 pm wrote:here is thepictures from roboforex. No trade.
and here is also log files. No errors.

2014.01.13 17:57:03 TMA_CG XAUUSD.m,M15: initialized
2014.01.13 17:57:03 TMA_CG XAUUSD.m,M15: loaded successfully
2014.01.13 17:57:03 TMA_CG XAUUSD.m,M15: initialized
2014.01.13 17:57:03 TMA_CG XAUUSD.m,M15: loaded successfully
2014.01.13 17:56:59 TMACG_Gold_M15_STACKING_B XAUUSD.m,M15: initialized
2014.01.13 17:56:59 TMACG_Gold_M15_STACKING_B XAUUSD.m,M15 inputs: LotSize=0; Risk=3; StopLossPips=30; MaxSpread=100; JumpingStopPips=32; JumpToBreakEvenOnly=true; BreakEvenProfit=2;
2014.01.13 17:56:31 TMACG_Gold_M15_STACKING_B XAUUSD.m,M15: loaded successfully
2014.01.13 17:56:16 TMA_CG XAUUSD.m,M15: initialized
Now these is the kind of info I'm talking 'bout!, thanks Varso!

And you get rewarded for it :) with a quick solution.

Your brokers advertised spread for Gold is 730 points, though from the quotes in the Order (F9) window, that's more like 73 points ( 7.3 pips ) [ the quotes on the Order window show 6.8 pips but I'm guessing you took that a few seconds after the chart, which is OK, gives all the info I need ]

In short, your broker is advertising the 2 digits after the decimal as pips, when in reality, for Gold, only the first digit after the decimal is the pip!

The solution for you guys with the sneaky XAUUSD.m broker type is to set MaxSpread to 1000
To your broker that will mean: 1000 points = 100 pips [ when in real life, that's 10 pips, which is the default setting anyway ]

So: MaxSpread = 1000

Cheers
Author:  dudest [ Wed Jan 15, 2014 10:59 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

Geges » Wed Jan 15, 2014 1:32 am wrote:
Hi Dudest,

I am testing version "B" on Finfx micro demo symbol = XAUUSDm
OOTB settings...10 trades....7 winners....3 losers...account up over 10%
in only 2 trading days. No errors in expert,journal or log file.

I also test version "Bmod" on Pellucidfx demo symbol = XAUUSD(.)
OOTB setting.... 7 trades....5 winners....2 losers....account up over 10%
No errors here either.

I did manually close 2 winners in the second account at the end of the
NY session.

I have version "C'" running on a different pc and have not been checked
that yet.

Like you I am going live with this next week.

Congratulations and Thank You very much.

Geges
Hey Geges!

Thanks for the feedback and kind words!, I'm glad it's working for you :)

Lemme know how ver "C" trades. All that change in "C" was:
--> LibCSS code is integrated ( just like in "Bmod" ver; thanks to SpiderX! )
--> Symbol and magic number checks were added to SL, TP, and JS functions
--> Magic numbers were made configurable
--> New function and configurable params were added to allow/dis-allow taking of Stack trades when TP is near
--> New function to check when the EA starts whether we have any running trades that are ours (i.e, were opened previously by us) [ to avoid taking duplicate trades if EA starts and finds price at one of the boundaries ]

Cheers!
Author:  varso [ Wed Jan 15, 2014 11:04 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

dudest » Wed Jan 15, 2014 11:49 am wrote:
varso » Tue Jan 14, 2014 6:16 pm wrote:here is thepictures from roboforex. No trade.
and here is also log files. No errors.

2014.01.13 17:57:03 TMA_CG XAUUSD.m,M15: initialized
2014.01.13 17:57:03 TMA_CG XAUUSD.m,M15: loaded successfully
2014.01.13 17:57:03 TMA_CG XAUUSD.m,M15: initialized
2014.01.13 17:57:03 TMA_CG XAUUSD.m,M15: loaded successfully
2014.01.13 17:56:59 TMACG_Gold_M15_STACKING_B XAUUSD.m,M15: initialized
2014.01.13 17:56:59 TMACG_Gold_M15_STACKING_B XAUUSD.m,M15 inputs: LotSize=0; Risk=3; StopLossPips=30; MaxSpread=100; JumpingStopPips=32; JumpToBreakEvenOnly=true; BreakEvenProfit=2;
2014.01.13 17:56:31 TMACG_Gold_M15_STACKING_B XAUUSD.m,M15: loaded successfully
2014.01.13 17:56:16 TMA_CG XAUUSD.m,M15: initialized
Now these is the kind of info I'm talking 'bout!, thanks Varso!

And you get rewarded for it :) with a quick solution.

Your brokers advertised spread for Gold is 730 points, though from the quotes in the Order (F9) window, that's more like 73 points ( 7.3 pips ) [ the quotes on the Order window show 6.8 pips but I'm guessing you took that a few seconds after the chart, which is OK, gives all the info I need ]

In short, your broker is advertising the 2 digits after the decimal as pips, when in reality, for Gold, only the first digit after the decimal is the pip!

The solution for you guys with the sneaky XAUUSD.m broker type is to set MaxSpread to 1000
To your broker that will mean: 1000 points = 100 pips [ when in real life, that's 10 pips, which is the default setting anyway ]

So: MaxSpread = 1000

Cheers
Thank you
I connect to Vps and rewritte the setting.
Do i rewrite also another setting? Like Stoplost, JumpingStop, BreakEven? Or only MaxSpread?
Author:  dudest [ Wed Jan 15, 2014 11:42 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

SpiderX » Wed Jan 15, 2014 3:35 am wrote:Hi Geges,

There was a report of some lot size issue by someone earlier....
until we find the gremlin responsible for this, it might be kinder on your live account to hold off trading live for a while. :)

Cheers
Yeah, I would like to get to the bottom of that too.

The lot size calculation function has remained UNCHANGED since the first version (that's the last thing I would touch, esp since it's worked like a charm all along)

From bazze's posts, the EA opened a trade of 50 lots. Depending on his account leverage, that would need QUITE A BIT of margin. The trade also went on to be a winner, meaning the account had the resources to sustain it.

E.g, my a/c has a leverage of 1:400, so 50 std lots would require a margin of (50lots * $250/lot = $12500).
At 3% risk, that would mean a risk of: 50lots * $10 per pip * 30pips = $15000. Meaning the a/c would have to have a balance of $495k

OK, I doubt bazze opened a demo of almost $500k. So I'm thinking may be it's one of those "cent" brokers who call a <fraction of a lot> a 'std' lot. So, for e.g, making 0.5 lots to be "50" lots.

That's why I need details of the whole scenario: the broker, the leverage, the trade details (open and close prices), account balance, details of other trades open (also 50 lots or normal), etc. I'm sure we'll figure it out.

Cheers!
Author:  dudest [ Wed Jan 15, 2014 11:53 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

varso » Wed Jan 15, 2014 2:04 pm wrote: Thank you
I connect to Vps and rewritte the setting.
Do i rewrite also another setting? Like Stoplost, JumpingStop, BreakEven? Or only MaxSpread?
Hmm...for now, just MaxSpread.

I'm thinking the rest ought to work OK, but check on the next trade (whether they are all set correctly) and let me know

Cheers
Author:  skoda2008 [ Wed Jan 15, 2014 12:01 pm ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

Dudest,

Here's usually what I do to deal with mini accounts:

Code: Select all

Defining the Variables:

int MiniAccountDivisor = 1;

Init:

if (MarketInfo(Symbol(),MODE_LOTSIZE) == 10000)MiniAccountDivisor = 10;
LotDivisor /= MiniAccountDivisor;

When calculating lots:

Lots = NormalizeDouble(AccountBalance() / LotDivisor,2);
if (Lots < 0.01)Lots = 0.01;
That's just an example to give you the idea, it may need to be changed for gold. In this instance I was just using AccountBalance / LotDivisor to work out a lot size, no fancy percent of account balance stuff.
All times are UTC Page 9 of 30