Attachments forums

List of attachments posted on this forum.


All files on forums: 160905

Re: Coding Help

RplusT, Wed Jul 11, 2018 11:33 pm

mLaden or Mr. Tools

I need your help please. I'm trying to add the following code to the indicator so it changes the settings according to the current TF. Getting consequently some errors I don't know how to handle.

int OnInit()
{

if (Kijun_Sen_Period==-1)
if (Envelope_Deviation == -1)

switch(Period())
{

case 1 : Kijun_Sen_Period=112; Envelope_Deviation= 100; break;
case 5 : Kijun_Sen_Period= 85; Envelope_Deviation= 330; break;
case 15 : Kijun_Sen_Period= 45; Envelope_Deviation= 550; break;
case 30 : Kijun_Sen_Period= 40; Envelope_Deviation= 700; break;
case 60 : Kijun_Sen_Period= 34; Envelope_Deviation= 800; break;
case 240 : Kijun_Sen_Period= 26; Envelope_Deviation=1700; break;
case 1440 : Kijun_Sen_Period= 22; Envelope_Deviation=3000; break;
case 10080 : Kijun_Sen_Period= 17; Envelope_Deviation=8000; break;

All files in topic