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

HELP WITH ERROR 4107
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2914
Page 16 of 18
Author:  fxdaytrader [ Fri Sep 20, 2013 10:25 am ]
Post subject:  Re: HELP WITH ERROR 4107

Ok, I will try - but may take some time, have to do other stuff also and the weekend is coming :mrgreen:
Author:  fx800 [ Fri Sep 20, 2013 11:08 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote:Ok, I will try - but may take some time, have to do other stuff also and the weekend is coming :mrgreen:
As usual, no hurry. We have all the time in the world.

Forex will still be here next day, next week, next year ......................................

Enjoy your weekend :!:

:D
Author:  fx800 [ Sat Sep 21, 2013 10:55 am ]
Post subject:  Re: HELP WITH ERROR 4107

Hi Fxdaytrader,

In view of the latest update by Steve to BASA regarding the basket SL for stacking trades, any further update to your mod ea in the pipeline ?

Thanks.

peter
Author:  fxdaytrader [ Sat Sep 21, 2013 11:48 pm ]
Post subject:  Re: HELP WITH ERROR 4107

I will implement it within the next update (I hope I will find the time to do within the next week), as well as - to 99,8% sure, a new margin-check ... 8-)

I think also about a kind of "all pairs-basket", so if the robot runs on several pairs, we could check all (filter by magicnumber) and then close on profit ob xyz % or whatever. Yes, I know the bots would check for themselves (e.g. the bot running on eurgbp, eurusd, usdchf, etc.), but that would not matter because one of them would close all the trades on basket-profit.

8-)
Author:  fx800 [ Sun Sep 22, 2013 10:32 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote:I will implement it within the next update (I hope I will find the time to do within the next week), as well as - to 99,8% sure, a new margin-check ... 8-)

I think also about a kind of "all pairs-basket", so if the robot runs on several pairs, we could check all (filter by magicnumber) and then close on profit ob xyz % or whatever. Yes, I know the bots would check for themselves (e.g. the bot running on eurgbp, eurusd, usdchf, etc.), but that would not matter because one of them would close all the trades on basket-profit.

8-)
Great.

I was thinking along the line of closing all profitable trades several hours into each trading session like in Multi 10.4 trader. We know that price usually peak three to four hours into each trading session, then retrace. This is what Bob says he usually do. My profit taking times would be 3am GMT, 12 noon GMT, 5 pm GMT.

At present, I am doing it manually for the ea's during the Europe and US session. I live in the UK, so would usually be asleep at 3 am.

This facility is not important and is a luxury. The most important thing is to make sure the pending order function works properly. It is an extremely useful function and works well in certain situations. So far, all the variations of your mod ea has remained in the black even when left to trade during NFP, FOMC, BOE, ECB news. So, they have weathered all the storms, even though they gave up quite a big chunk of profit during the last NFP, but made quite a big profit during the last FOMC meeting because the news just happen to go their way.

In practice, I will not trade during high impact news , until things have settled down. If things go my way, I will re-start the ea fifteen minutes or half an hour after the news. Quite often the momentum will carry on for another 24 hours before retracing like this wednesday and thursday. Price only started to retrace on friday.

Regarding the margin check, the ForexKiwi in most of Steve's ea has worked well for the past few years and I will continue using it on my live accounts.
Author:  fx800 [ Mon Sep 23, 2013 8:35 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote:Ok, I will try - but may take some time, have to do other stuff also and the weekend is coming :mrgreen:
The thread has moved ..........................

http://www.stevehopwoodforex.com/phpBB3 ... f=5&t=3159

peter
Author:  fx800 [ Wed Sep 25, 2013 11:30 am ]
Post subject:  Re: HELP WITH ERROR 4107

Hi Fxdaytrader,

Is it possible to add a DailyPivot filter to Mr Longs Multi 10.4 trader.

I have found that adding only buy when askPrice > DailyPivot and only sell when bidPrice < DailyPivot would cut out some of the losing trades.
Author:  fxdaytrader [ Wed Sep 25, 2013 11:34 am ]
Post subject:  Re: HELP WITH ERROR 4107

yes, I think so.
Will add it when doing the other stuff (sorry, too busy at the moment) ... 8-)

If you like, in the meantime you could try to add it for yourself.
One way could be to edit the ordersend-function, or implement some bool before the ordersend-command.

for example:

you have the function bool PivotOk(string symbol)
here you check if MarketMode(symbol,MODE_ASK) >< whatever (calculate the pivots first) and return true (send trade) or false (do not send).

Instead of bool result = ordersend(...) you could code

if (PivotOk(symbol)) {
bool result = (ordersned) ....
}

just one simple way, but should work ;)
Author:  fx800 [ Wed Sep 25, 2013 11:37 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote:yes, I think so.
Will add it when doing the other stuff (sorry, too busy at the moment) ... 8-)
Thanks very much.

As usual, not in a hurry.
Author:  fx800 [ Wed Sep 25, 2013 12:03 pm ]
Post subject:  Re: HELP WITH ERROR 4107

I tried to add another line of code to the Send The Pending Orders function

if (!askPrice > DailyPivot(CurrentPair))
continue;

and another void CalculatePivots function

Code: Select all

void CalculatePivots(string symbol)
{
  

   datetime start =  iTime(symbol, PERIOD_D1, 0);
   
   
   //Daily
   int shift = 1;//Need to deal with a Sunday candle
   int d = TimeDayOfWeek(TimeCurrent() );
   if (d == 1 && CriminalHasSundayCandle) shift = 2;
   
   last_low=iLow(symbol, PERIOD_D1, shift);
   last_high=iHigh(symbol, PERIOD_D1, shift);
   last_close=iClose(symbol, PERIOD_D1, shift);
 
   //Pivot
   P=(last_high+last_low+last_close)/3;
   DailyPivot = P;
   DrawLine(dailypivot, start, DailyPivot, start + 60 * 3600, DailyPivot, DailyPivotColour, 2, STYLE_SOLID, true);
   
   
}//End void CalculatePivots()
 
Keeps getting error "DailyPivot" function is not defined.

The above seems to work in single chart ea like basa, but not in a multi trader.
All times are UTC Page 16 of 18