I want to ask please if there are interdependencies that might cause issues when running 2 scripts on same instrument, eg one script in a range chart and another script in a tickchart. Both scripts in onbarupdate there is the check if flat or long or short. Can there be some issue with stops or with conditions because of the other script maybe?
I use different ordernames:
entryOrderSr1a=EnterShort(4,1, "rS1a"); // strategy running in a range-chart
entryOrderTSr1a=EnterShort(4,1, "TrS1a"); // strategy running in a tick-chart
It seems there is an issue with my lines I´m working with (for catching pivots, moving stops...) that I remote with my customized buttons. When I moved the line in one chart it doesnt work in the other chart anymore. I have in onbarupdate
if(shortlinedraw==false)
{
if(storeshort>0 && (Closes[4][0]>Lows[4][0]-1*TickSize || Closes[4][0]<Highs[4][0]+1*TickSize) && shortlinedraw==false)
{TxShortLine = Draw.HorizontalLine(this, "TxShortLine", true, Highs[4][0]+2*TickSize, Brushes.DeepPink, DashStyleHelper.Dash,2);shortlinedraw=true;TxShort Line.IsLocked=false;}
}
if(shortlinedraw==true)
{
if (DrawObjects["TxShortLine"] != null && DrawObjects["TxShortLine"] is DrawingTools.HorizontalLine)
{
shortlinePrice = Instrument.MasterInstrument.RoundToTickSize(TxShor tLine.StartAnchor.Price);
shortlinevalue = shortlinePrice;
}}
I could build this from the helpguide. Do I have to add something so that when I move the line it does not have impact on the line in the other script?
Thank you!
Tony

Comment