|
4 registered members (TipmyPip, alibaba, the1, 1 invisible),
5,206
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Delay Opening trades
#474328
10/06/18 17:21
10/06/18 17:21
|
Joined: Feb 2015
Posts: 652 Milano, Italy
MatPed
OP
User
|
OP
User
Joined: Feb 2015
Posts: 652
Milano, Italy
|
If I want to randomly open trades from 1 to 5 minute later than bar closing period (as z7) with Hedge active how can I do? May I change BarOffset during trading? This script works in test, I do not logically correct. Changing BarOffset every bar am I loosing price info in the bar? Thank You
void run()
{
set(LOGFILE);
MaxLong = 100;
MaxShort = 1;
BarPeriod =60;
if (TrainMode) BarOffset = 0;
else BarOffset = random(6);
enterLong();
}
|
|
|
Re: Delay Opening trades
[Re: Spirit]
#474332
10/07/18 10:01
10/07/18 10:01
|
Joined: Feb 2015
Posts: 652 Milano, Italy
MatPed
OP
User
|
OP
User
Joined: Feb 2015
Posts: 652
Milano, Italy
|
Thank You Spirit, in the log it works, but is not logically sound.
EntryDelay seems to be a suitable solution but is not compatible with Hedge = 5, accordingly with the Manual.
In z7 Hedge is not used and the delay is fixed for each bar. I could test it live, but it will take a lot of time. Maybe somebody as already a solution
Last edited by MatPed; 10/07/18 10:01.
|
|
|
|