function, indicator, strategy - why?

Questions about MultiCharts and user contributed studies.
User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

function, indicator, strategy - why?

Postby MAtricks » 19 Nov 2013

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..

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: function, indicator, strategy - why?

Postby arjfca » 19 Nov 2013

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: Allow you to write code that could be re-use in another indicator / signal

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

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: function, indicator, strategy - why?

Postby MAtricks » 19 Nov 2013

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.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: function, indicator, strategy - why?

Postby arjfca » 19 Nov 2013

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.
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.

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 :)

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: function, indicator, strategy - why?

Postby MAtricks » 19 Nov 2013

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.


Return to “MultiCharts”