Coding help - page 749

 
traderduke:

mladen

I'm using your TMA+CG for an EA and I can't seem to get it to trade Properly. Can you take a look at it. I realize it repaints but it also follows the trend, but with controllable bands it might work.  The TMA looks good on the chart but the EA can't seem to capture the buffer 3 & 4 triggers. 

Thank you


Ray

Ray


Centered TMA repaints - you can not use it in an EA in a normal way

 

Professor mladen :)

Is it possibe to make this piece of code simpler?

It works ok, but I do get the feeling it can be more neat... (YOUR WAY)

//-------------- 

string getIndicatorSlope(int i,double& price[])

{

   string symbol = CharToStr(104);

if (price[i]-price[i+1]>0) symbol = CharToStr(228);

        if (price[i]-price[i+1]<0) symbol = CharToStr(230);

   return(symbol);

}

 
Hey mladen so could you help with my problem?
 
mladen:
No simpler way
string getIndicatorSlope2(int i,double& price[])
{
   string symbol;
   symbol = (price[i]-price[i+1]>0) ? CharToStr(228) : (price[i]-price[i+1]<0) ? CharToStr(230) : CharToStr(104);
   return(symbol);

}

 

what do you think? 

 

Has anyone seen the value in a McNicholls ma crossover signal? Arrow/vertical line?
I have looked everywhere and never seen an indicator with this signal facility.

TEAMTRADER 

 
knaimad:
string getIndicatorSlope2(int i,double& price[])
{
   string symbol;
   symbol = (price[i]-price[i+1]>0) ? CharToStr(228) : (price[i]-price[i+1]<0) ? CharToStr(230) : CharToStr(104);
   return(symbol);

}

 

what do you think? 

That is same thing just written differently(check the what does the "?" operator does and then you shall see)

All the best

 
mladen:

Ray


Centered TMA repaints - you can not use it in an EA in a normal way

mladen

that's what I thought when I couldn't get it to work the usual way. 

Can you show me the other way.

thank you

ray

 
traderduke:

mladen

that's what I thought when I couldn't get it to work the usual way. 

Can you show me the other way.

thank you

ray

The other way is as simple as it gets : forget about it (and any repainting "signal" used from an EA)
 
TEAMTRADER:

Has anyone seen the value in a McNicholls ma crossover signal? Arrow/vertical line?
I have looked everywhere and never seen an indicator with this signal facility.

TEAMTRADER 

Did you test McNicholls with/from averages ver
 

mr mladen :

could you add alarm on it when candle close

it have just alarm on current candle

 

regard 

Files: