Hello
By any chance, is there a way to have an indicator be run or stopped using only a mouse click.
That would be great. Actually, I need to right click, select indicator, select the appropriate one, set the status on / off.
Once in a while, I need to reset an indicator because this one is used in communication with Excel.
Martin
Running, Stopping an indicator using a mouseclickevent
- ABC
- Posts: 723
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: Running, Stopping an indicator using a mouseclickevent
Martin,Hello
By any chance, is there a way to have an indicator be run or stopped using only a mouse click.
That would be great. Actually, I need to right click, select indicator, select the appropriate one, set the status on / off.
Once in a while, I need to reset an indicator because this one is used in communication with Excel.
Martin
I guess that this is possible using a mouse click event that triggers a recalculate command inside your code.
I haven't done that though, but I have triggered the calculation of an indicator based on clicks, so a recalculate should be possible, too.
Regards,
ABC
- Katrin Yanenko
- Posts: 55
- Joined: 28 Nov 2011
- Has thanked: 18 times
- Been thanked: 23 times
Re: Running, Stopping an indicator using a mouseclickevent
Hi Martin,
You can make your script be recalculated by analyzing the location of a drawing on a chart.
Such keywords as #return http://www.multicharts.com/trading-soft ... php/Return and recalculate http://www.multicharts.com/trading-soft ... ecalculate can help you to achieve this task.
So if you make a condition with the drawing location and when you change it by dragging the drawing on a chart then the study will be recalculated.
Best Regards,
Katrin Yanenko
You can make your script be recalculated by analyzing the location of a drawing on a chart.
Such keywords as #return http://www.multicharts.com/trading-soft ... php/Return and recalculate http://www.multicharts.com/trading-soft ... ecalculate can help you to achieve this task.
So if you make a condition with the drawing location and when you change it by dragging the drawing on a chart then the study will be recalculated.
Best Regards,
Katrin Yanenko
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Running, Stopping an indicator using a mouseclickevent
arjfca, I have sent you the fix for testing via email.
Re: Running, Stopping an indicator using a mouseclickevent
Henry,arjfca, I have sent you the fix for testing via email.
I did installed your newer version, but problem still there + create another dll problem.
I will sent info to your email
Martin
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Running, Stopping an indicator using a mouseclickevent
In your code you are referencing historical values of the variables. When you click on historical bars (away from the recent data), MultiCharts recalculates the study trying to adjust the max bars back. This causes multiple output lines.
In order to avoid this issue you need to use the reserved words that are not limited by the MaxBarsBack setting:
Symbol_high
symbol_low
So in your code it should be:
vclickbarhigh=symbol_high[vbarsago];
vclickbarlow=symbol_low[vbarsago];
In order to avoid this issue you need to use the reserved words that are not limited by the MaxBarsBack setting:
Symbol_high
symbol_low
So in your code it should be:
vclickbarhigh=symbol_high[vbarsago];
vclickbarlow=symbol_low[vbarsago];