HELP WITH ERROR 4107

User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 4107

Post by fxdaytrader »

Ok, I will try - but may take some time, have to do other stuff also and the weekend is coming :mrgreen:
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 4107

Post by fxdaytrader »

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-)
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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.
You do not have the required permissions to view the files attached to this post.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 4107

Post by fxdaytrader »

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 ;)
Last edited by fxdaytrader on Wed Sep 25, 2013 11:37 am, edited 2 times in total.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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.
Last edited by Anonymous on Wed Sep 25, 2013 12:25 pm, edited 2 times in total.
Post Reply

Return to “Coders Hangout”