if .... then
Code: Select all
begin
buy ("tiers1L") 1 contract next bar at market ;
TP1L = (entryprice + 5) ;
SLL = (lowest(low,3) - 1) ;
end;
// setstopposition ;
setstoploss(SLL) ;
setprofittarget(TP1L) ;
Code: Select all
begin
buy ("tiers1L") 1 contract next bar at market ;
TP1L = (entryprice + 5) ;
SLL = (lowest(low,3) - 1) ;
end;
// setstopposition ;
setstoploss(SLL) ;
setprofittarget(TP1L) ;
it is a timing issue...Hello, I'm getting in & out of the market with this code. I suspect the "entryprice" is not computed for i see the takeprofit order = 5. Why ?
if .... thenThank you !Code: Select all
begin
buy ("tiers1L") 1 contract next bar at market ;
TP1L = (entryprice + 5) ;
SLL = (lowest(low,3) - 1) ;
end;
// setstopposition ;
setstoploss(SLL) ;
setprofittarget(TP1L) ;
... Next bar openWhen does "next bar at market" happens?
... Next bar when the market order went trough.When can you get the entryprice?
What seems to be the problem?Do you know what the workaround is ? Obviously i'm missing out ://
There are not that many big differences between real-time trading and backtesting in my view, it's more a difference between 'average', 'good' and 'better' coding.I realise there are a number of things that are fundamentally different in backtesting signals & live trading signals. I would like to see a resource that points out those fundamental differences. That would certainly shorten my learning curve