Page 1 of 1

code problem

Posted: Oct 09 2018
by plaforte
Hello, I am not programmer but try to recycle code from existing study that works. It is a simple PaintBar study based on the value of an oscillator. This oscillator formula works well already on other charts, and the paintbar section also works on other charts as well but when I put these 2 segments together I get no plot. Can someone point me in the right direction.

Thank you

Code: Select all

Inputs:
PlotPriceH( High ),
PlotPriceL(low);


Value1 = Momentum(RSI(Close,14),9) + Average(RSI(Close,3),3) ;


If value1 > 77.5 then
begin
PlotPaintBar( High, Low, "DoW" ) ;
end;

Re: code problem

Posted: Oct 09 2018
by TJ
Try this:

Code: Select all


Inputs:
PlotPriceH( High ),
PlotPriceL(low);


Value1 = Momentum(RSI(Close,14),9) + Average(RSI(Close,3),3) ;


If value1 > 77.5 then
begin
Plot900( High, "DoW.H" ) ; // set plot style as BAR HIGH
Plot901( Low, "DoW.L" ) ; // set plot style as BAR LOW
end;

Re: code problem

Posted: Oct 10 2018
by plaforte
Thank you TJ, I managed to get it work with your code. It seems that the best for my need would be to learn to program a strategty. Could you send me a link to manual and videos about simple strategy just based on an oscillator, I did not find it through my search.

By the way in your big reference message in the FAQ section, the first link there to MC users manual, does not work any more.

Best regards

Re: code problem

Posted: Oct 10 2018
by TJ
Please Google for the free ebooks
viewtopic.php?t=6929

Re: code problem  [SOLVED]

Posted: Oct 10 2018
by plaforte
Thank you TJ