I would like to place order whenever there is buy signal. My code:
===============================
cMA = MA(Close,19);
pMA = ref(MA( Close, 2),-1);
Buy=cMA>pMA;
if(Buy){
placeorder();
}
===============================
The error is, "Buy" is an array, not a numberic or boolean type.
How can I correct this?
Thanks for any help
===============================
cMA = MA(Close,19);
pMA = ref(MA( Close, 2),-1);
Buy=cMA>pMA;
if(Buy){
placeorder();
}
===============================
The error is, "Buy" is an array, not a numberic or boolean type.
How can I correct this?
Thanks for any help