+1 888 340 6572 GET STARTED
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
bug_report_small.png
Open Bug report MC-2833

[IntrabarOrderGeneration = true] Does not work on Kase range bars

action_vote_minus_faded.png
-1
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

As you can see the system will only execute the trade on the close

YET the same code will place an arrow where the code tells it.

The Blue and Red arrows the system - the Pink arrows are a text tool placed by the same code.

This means that SOMETHING IS WRONG

[IntrabarOrderGeneration = true]

var:intrabarpersist dnband2(0),intrabarpersist upband2(0);

dnband2= {the lowest lower band "outside lowest"}
upband2= {the highest high band "outside highest"}

if c<=dnband2 and c[1]>=dnband2 then begin sell short next bar market;

// code above will only sell on close of the bar no matter how you code it.

//yet code below will put arrow where instructed by the code above

value1=Arw_New_s(Date, Time_s,dnband2, true); //plots the sell arrow at the sell stop price
arw_setsize(value1,0);
arw_setstyle(value1,3);
arw_setcolor(value1,pink);
end;

if c>=upband2 and c[1]<=upband2 then begin buy next bar market;

//code above will on buy on close of bar no matter how you code it.

//yet code below will put arrow where instructed by the code above

value1=Arw_New_s(Date, Time_s,upband2, false); //plots the sell arrow at the sell stop price
arw_setsize(value1,0);
arw_setstyle(value1,3);
arw_setcolor(value1,pink);

https://imagizer.imageshack.com/img924/8546/YX20zP.png < LARGER IMAGE

Please stop telling us it works - look into it

All I want is to buy where I tell it and sell where I tell it - why is that impossible?

Steps to reproduce this issue

20 point Kase bar updated every tick

Comments (2)
#1
user-offline.png  Mark Brown (Mark Brown)
Dec 30, 2022 - 18:43
#2
user-offline.png  MultiCharts Support (MultiCharts)
Jan 05, 2023 - 08:38
Hello Mark,

That’s expected behaviour for your script if those are backtesting results on your screenshot. Please see how signals are calculated depending on the environment here.

The pink arrows are plotted by your script without the RecoverDrawings = false, so their values might change with new ticks and not correspond to the variable’s first value.

When calculated on real-time data, your signal sends orders within a bar and corresponds to the arrow drawing. Please see the screenshot here.

The full script used for testing is here.

History
Issue basics
  • Type of issue
    Bug report
  • Category
    Not determined
  • Targeted for
    Not determined
  • Status
    Not a bug
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Reproducability
    Not determined
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates