Hello all,
Is there a way to tell a strategy to wait before opening a new trade after a loss? e.g. If a bet loses, I want my strategy to wait 10 minutes before considering entering a trade again (i.e. it should ignore any trade signals that might occur in that 10 minute period)
Many thanks
Geoff
Hi Geoff
I’m just about to go out but you could try something like this ..this uses the bars as the time and looks to enter once the price has moved a certain distance from the first entry…
IF c1 AND NOT LongOnMarket THEN
BUY 2 PERPOINT AT MARKET
ENDIF
//let's add another order while price continue to move lower (more than 10 points) than the last order taken with a condition of 5 bars elapsed since then
IF BARINDEX-TRADEINDEX(1)>20 AND Close-TRADEPRICE(1)>20 AND LongOnMarket THEN
BUY 2 PERPOINT AT MARKET
ENDIF
You can use BARINDEX and TRADEINDEX like Big Hug said in his previous post. You can also make comparison between schedules if you store “time” in a variable, when you launch an order.
thanks guys…will try that
“You can also make comparison between schedules if you store “time” in a variable, when you launch an order”
Hi Nicolas –
Are you referring to
indicator3 = //whatever your condition is
c3 = (indicator3 >= X )AND TIME >090000 AND TIME <200000
If not – I wondered if you could post an example of the code when you have a moment
…Thanks in advance
@Big Hug
You can give a try with this code snippet for instance:
if buycondition and minute-lasttime>10 or minute-lasttime>-50 then
lasttime = minute
buy 1 contract at market
endif