Greetings! A weird issue I've run into. I was playing back my strategy to see where its going a foul. Anyway when I use tick replay $PLAYBACK and watch it in real time there are 'black' spots in the chart where the red/green bar background didnt print. But as soon as I hit pause and replay, or hit jump 10minutes they all fill in. Here is a screen capture of what I mean. Nothing has been change in the code between the two captures. All I did was stop and restart the tick play (without reloading the file). When its playing real time I can very quickly see red or blue starting to fill the black back ground in then when the chart shifts left it disappears.
Here is the part of the code that calls the red/blue background bar print.
Here is the code for action4 and action5:
Is this a bug or am I somehow incompitent in many ways
P.S. No im not editing the code in the wizard but thats how it started out
Here is the part of the code that calls the red/blue background bar print.
PHP Code:
//{{STRATEGY CODE -------REPLACE THIS WITH SOMETHING GOOD
if (
vEMA8.getValue(MAStudy.MA) < vEMA21.getValue(MAStudy.MA) &&
getBarState()== BARSTATE_NEWBAR &&
AllowTrading == true
) onAction4()
//}}
//{{
else if (
vEMA8.getValue(MAStudy.MA) > vEMA21.getValue(MAStudy.MA) &&
getBarState()== BARSTATE_NEWBAR && // LESSON FALSE SIGNALS ON TICK REPLY
AllowTrading == true
) onAction5()
PHP Code:
//{{Action_4
function onAction4() {
setBarBgColor(Color.red);
// if (Strategy.isShort() == false)
if (vLastAlert != 4 )
{
Strategy.doShort("Short Entry", Strategy.CLOSE, Strategy.THISBAR, Strategy.DEFAULT, 0);
EntryPrice = close(0);
}
vLastAlert = 4;
}
//}}Action 4 over and out
//{{Action_5
function onAction5() {
setBarBgColor(Color.blue);
// if (Strategy.isLong() == false)
if (vLastAlert != 5 )
{
Strategy.doLong("Long Entry", Strategy.CLOSE, Strategy.THISBAR, Strategy.DEFAULT, 0);
EntryPrice = close(0);
vLastAlert = 5; }
}
//}}The end of action 5
P.S. No im not editing the code in the wizard but thats how it started out
Comment