Why do we separate a strategy, function, and indicator as different types of scripts? Wouldn't it make more sense to just have one type of script? We could then use a plot statement if we want to plot, an order statement if we want to place and order, or both. As it is now, I create an indicator and strategy for everything which seems silly.
I've been scratching my head on this one for a while..
function, indicator, strategy - why?
Re: function, indicator, strategy - why?
Function: Allow you to write code that could be re-use in another indicator / signalWhy do we separate a strategy, function, and indicator as different types of scripts? Wouldn't it make more sense to just have one type of script? We could then use a plot statement if we want to plot, an order statement if we want to place and order, or both. As it is now, I create an indicator and strategy for everything which seems silly.
I've been scratching my head on this one for a while..
Signal: Code to trade
Indicator: Code to see what you want to see
Sure you could mix them, That the beauty of MC IMO
Martin
Re: function, indicator, strategy - why?
Thanks for the description of each. However, I think that my post may have been misunderstood.
I'm curious why there can't be one script that can plot, create a function, or execute orders. This way we can do all of these in one script. Why separate them in different types of scripts? The code separates them as it is.
Example:
Our classic moving average code:
plot1( MA1 ) ;
plot2( MA2 ) ;
If ma1 > ma2 then begin
buy this bar ;
plot3( MA_X ) ;
end ;
Instead of that elementary example being in one piece of code, it must be in two... One for plotting and one for executing orders.
I'm curious why there can't be one script that can plot, create a function, or execute orders. This way we can do all of these in one script. Why separate them in different types of scripts? The code separates them as it is.
Example:
Our classic moving average code:
plot1( MA1 ) ;
plot2( MA2 ) ;
If ma1 > ma2 then begin
buy this bar ;
plot3( MA_X ) ;
end ;
Instead of that elementary example being in one piece of code, it must be in two... One for plotting and one for executing orders.
Re: function, indicator, strategy - why?
Probably a question of getting more PC resource working toward trading instead plotting on the screen. In some case, you need fast execution toward the trade side, not on result on the screen.Thanks for the description of each. However, I think that my post may have been misunderstood.
I'm curious why there can't be one script that can plot, create a function, or execute orders. This way we can do all of these in one script.
Example:
Our classic moving average code:
plot1( MA1 ) ;
plot2( MA2 ) ;
If ma1 > ma2 then begin
buy this bar ;
plot3( MA_X ) ;
end ;
Instead of that elementary example being in one piece of code, it must be in two... One for plotting and one for executing orders.
Also, MC is design to be compatible with TS so that could explain it also. The best one to answer would be the system engeneer...
Martin
Re: function, indicator, strategy - why?
As it is, we have the indicator plotting on the chart that also has the strategy in another piece of code which is executing orders. Somehow I don't believe that this a better use of processing power.
I'm curious to know the developers logic behind this.
I'm curious to know the developers logic behind this.