Topic: Question about strategy coordination
Hi,
Can a Coundown be constructed in an EA code? "Open x milliseconds after opening the bar"?
I need a way to coordinate several strategies.
Would be very pleased about a solution.
THS
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Help and Support → Question about strategy coordination
Hi,
Can a Coundown be constructed in an EA code? "Open x milliseconds after opening the bar"?
I need a way to coordinate several strategies.
Would be very pleased about a solution.
THS
You can do it in the EA MQL code, but the problem is that such condition cannot be backtested.
Well, how must I write this?
It must be something like that:
//+------------------------------------------------------------------+
//| Open in N milliseconds.mq4 |
//| Copyright 2016, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
uint barOpenTime=0;
uint openMilliseconds=2000;
bool allowOpen=false;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnTick()
{
// Set the count of milliseconds from Bar Open
if(Volume[0]==1)
{
barOpenTime=GetTickCount();
allowOpen=true;
}
uint timeFromBarOpen=GetTickCount()-barOpenTime;
if(timeFromBarOpen>=openMilliseconds && allowOpen)
{
allowOpen=false;
OpenPosition();
}
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OpenPosition()
{
}
//+------------------------------------------------------------------+
Unfortunately, this helps me so not further. Where to insert the code and what changes do I have to make? My programming skills are microscopic.
Dear Mr. Popov,
Would you make an effort? My experiments are in vain.
Already the hope for a solution helps me further.
Please.
(Popov) Re: Open logic
I don't see an easy way to do this.
The expert must write somewhere at what time it raised the signal.
At every tick, the expert must check this record and to decide if the defined time span is passed.
When it is time to make a deal, it must calculate the order params (Price, SL ,TP... because they will be different) and to execute the signal. from here: http://forexsb.com/forum/post/28969/#p28969
Where can the signal only be raised?
Logfile entry is not enough, right?
order sell market 0.10 DE.30.. sl: 0.0 tp: 0.0
This feature is not a subject of the FSB Pro experts.
You can try to find a freelancer MQL coder to help you with that. There are many cases that have to be considered and I do not see how this feature can return the investment for its development.
with regret. I did not want to push.
Hi . I am newbie and id like to ask .
Are you closing your PC at midnight , or you just leave it to work 24 hours ?
Are strategies failing if I close PC during midnight ?
Are you closing your EA on the big market news ?
Is FSB synchronizing its time with my local time , when I am using entry time or exit time or Day Closing indicators, do I have to change my time settings ?
Thanks .
Hi Landon,
First question: No
Second question: No
Third question: No
Fourth question: No problems can be ascertained about that. Possible settings can be very simply carried out.
Thanks to the demand and welcome.
Thank you tho.schu.
It seems I am generating questions here , instead of strategies.
Ok. Last 5.
(please note that if PC closed , then EA it is not working )
1) If I close my PC during the night, (before Closing PC) should I have to close my EAs open positions too ?
2) If I close my EAs open positions, don’t I cause failure to my EAs performance because I randomly close my EAs positions?
3) If I hold open my EAs positions, should I put a stop loss during the night ?
(if my EA doesn’t use stop losses)
4) Is there any way to find out , what will happen to my strategy’s performance , If I am closing the EA at nights ?
5) Do you ever use << Randomize Starting Bar >> function on Monte Carlo Analysis?
( I am asking because I never got good results on this test and I don’t know how to fix this )
Thanks Every One ..
1) If you don't want to trade overnight, use Day Closing 2 indi, then you can see its behaviour during backtesting also.
2) Principally, yes.
4) Answer nr 1 applies.
I got it now , thanks.
Forex Software → Help and Support → Question about strategy coordination
Powered by PunBB, supported by Informer Technologies, Inc.