Simple Coding Help - No Promise.

Break down below:

Buy1= Buy condition. eg MACD cross signal
Buy1_ButtonPressed =
if Buy1_Button not pressed then turn on Buy1 condition.
if Buy1_Button was pressed then turn off Buy1 condition.

I don't want to entertain you - because it not become simple coding help.

What you can do now is to study 1 simple AFL, as simple as posible.


look at where is the StaticVarGet() , eg
put in a procedure in it:

if(StaticVarGet("ExpOn")==1)
{
ProcessBuy1Condition(true);
DrawBut("", X0+180, Y0+380, X0+210, Y0+410, colorDarkGreen, colorDarkGreen);
}// ExpOn

if(StaticVarGet("ExpOff")==1)
{
ProcessBuy1Condition(false);
DrawBut("", X0+180, Y0+420, X0+210, Y0+450, colorDarkRed, colorDarkRed);
}// ExpOff

before that define your Buy1 Condition & ProcessBuy1Condition

Buy1 = Cross(macd(), signal());

procedure ProcessBuy1Condition(Trigger)
{

if (Trigger)
{
Buy = Buy1;
Plotshape Buy Arrow .....
}
else
Buy = false;

}

Some thing like that.

Then try to use the log window and _TRACE() setup debug point to check what went wrong.
The best is to upgrade to Version 6.10 and above, to use also with the DEBUGGER to set breakpoint and step through the program and
watch the variables ....etc.

To reduce errors, it always good to work in a separate standalone module level first for your buy condition, before assemble to the unit level.


End of advice/coding guidance
Thank u soooo much

When the Issue is a common cold, we go to a Medical store, buy some OTC medicines and do Self Medication /Help File.
But when the issue is Surgical, we dont do self surgery , we place ourselves in Doctor Kelvin SAFE Hand

Thanx again, will go thru ur guided path and i wont bother u again until the eruption of next serious Symptom.

Regards
 
Hi Trash,

Let me put it this way, they are not as good as you that will know how to complete the code in 13 lines. I can understand your high standard and your proud of yourself.

If you are willing to transfer your know how to show them how you do the 13 lines, it will be very grateful to learn from you. But if not - then i think become show-off to other.

No point doing this here & there.

Thank you & best regards...KH
O Mighty Kelvin, :clap:

I request you if you could please please take a look at this:

I found a MQL4 (attached) that plots Sine Wave oscillator. It is in MQL4 format. It would be great help if you could translate it into AFL.

The MQL4 can be found here.

https://ufile.io/1c241

I know this not exactly a simple coding help, but if possible do assist me.

Will be much obliged brother.:thumb:

Thanks
 

KelvinHand

Well-Known Member
O Mighty Kelvin, :clap:

I request you if you could please please take a look at this:

I found a MQL4 (attached) that plots Sine Wave oscillator. It is in MQL4 format. It would be great help if you could translate it into AFL.

The MQL4 can be found here.

https://ufile.io/1c241

I know this not exactly a simple coding help, but if possible do assist me.

Will be much obliged brother.:thumb:

Thanks
We only do free "Simple Coding Help" that don't affect much of our life, thing can be done in 1~2 hours, or some may ok to take 1~2 days.

If code expert want to do complicated MTQ4 conversion for you then the Effort is huge, then it better do some money compensation for their work.

If keep doing these kind of MTQ4 conversion to AFL for free and not for fee, will retire from this forum very soon.

If i want to do MTQ4 conversion for you, i will convert into DLL, and make sure my hard work is protected.

So if you really interested, then highlight "Your willing to pay for it". Let the rest of the code export bid for the job, better then keep asking and no response.

Good Luck.

Maybe I will do 1 or few simple MTQ4 conversion to AFL for free when reach post 999.
 
Last edited:
We only do free "Simple Coding Help" that don't affect much of our life, thing can be done in 1~2 hours, or some may ok to take 1~2 days.

If code expert want to do complicated MTQ4 conversion for you then the Effort is huge, then it better do some money compensation for their work.

If keep doing these kind of MTQ4 conversion to AFL for free and not for fee, will retire from this forum very soon.

If i want to do MTQ4 conversion for you, i will convert into DLL, and make sure my hard work is protected.

So if you really interested, then highlight "Your willing to pay for it". Let the rest of the code export bid for the job, better then keep asking and no response.

Good Luck.

Maybe I will do 1 or few simple MTQ4 conversion to AFL for free when reach post 999.
Kelvin,

Fair enough.:)... At this stage not in a position to pay. Didn't realize it was lot of work. Thanks for taking the time to give your inputs.

Much appreciated.

Have a nice day.
 

TradeOptions

Well-Known Member
We only do free "Simple Coding Help" that don't affect much of our life, thing can be done in 1~2 hours, or some may ok to take 1~2 days.

If code expert want to do complicated MTQ4 conversion for you then the Effort is huge, then it better do some money compensation for their work.

If keep doing these kind of MTQ4 conversion to AFL for free and not for fee, will retire from this forum very soon.

If i want to do MTQ4 conversion for you, i will convert into DLL, and make sure my hard work is protected.

So if you really interested, then highlight "Your willing to pay for it". Let the rest of the code export bid for the job, better then keep asking and no response.

Good Luck.

Maybe I will do 1 or few simple MTQ4 conversion to AFL for free when reach post 999.
Thanks for all the help that you provide to the community KelvinHand. :clapping:

If someone wants to take your services as a freelancer for some Amibroker AFL work, then do you charge on per project basis or per hour ?

Thanks and regards
 
What so difficult ?
PHP:
SetBarsRequired( -2, -2 );
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

procedure Trash_Ridiculous_Set(bb,ee)
{
for (i=bb; i<=ee; i++)
{
  tf = i * in1Minute;
  TimeframeSet(tf);
    SAD = C<O;
    TimeframeRestore();
    VarSet("Trash"+i, TimeFrameExpand(SAD,tf,expandPoint));
}


}

function Trash_Ridiculous_Get(n)
{
    return VarGet("Trash"+n);
}

procedure HappyGoLucky_Set(bb,ee)
{
for (i=bb; i<=ee; i++)
{
  tf = i * in1Minute;
  TimeframeSet(tf);
    Happy = C> ref(C, -1);
    TimeframeRestore();
    VarSet("Trash"+i, TimeFrameExpand(Happy,tf,expandPoint));
}


}

function HappyGoLucky_Get(n)
{
    return VarGet("Happy"+n);
}


procedure tf_bull_set(bb,ee)
{
for (i=bb; i<=ee; i++)
{
  tf = i * in1Minute;
  TimeframeSet(tf);
    up = C > O;
    TimeframeRestore();
    VarSet("M"+i, TimeFrameExpand(up,tf,expandPoint));
}
    
}

function tf_bull_get(n)
{
    return VarGet("M"+n);
}

tf_bull_set(3,5);

m3  = tf_bull_get(3);
m4  = tf_bull_get(4);
m5  = tf_bull_get(5);
    
    for(b=0; b<BarCount; b++)
        if (M3[b] AND M4[b] AND M5[b]) 
           PlotText("3~5_M" , b, L[ b ], colorRed, colorDefault, -12 );  

Trash_Ridiculous_Set(15, 30);
TR15=Trash_Ridiculous_Get(15);

HappyGoLucky_Set(60,240);
HGL240=HappyGoLucky_Get(240);
For the benefit of your confuse mind.
Hello,
i'm gonna check it with other values

mx = tf_bull_get(x); i guess it will be assigned without manually assigned each number


There's a big flaw i notice ..
Numbers are moving even after when you use O1,h1,l1,c1 ...(complete candle)

Using O or C make no sense other than looking in historical charts

I used O1 or C1 so it should not move with price when you are seeing them either in real time or bar replay
it doesn't work in same way , it start move with price


http://imgur.com/6bMmpm8


In this, 4 number is moving with price. same number move for 3-4 candles before it fix it.

Code:
SetBarsRequired( -2, -2 ); 
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();
for( i = 1; i < 5; i++ ) 
{ 

    TimeframeSet( i*in1Minute ); 
     O1 = Ref(O, -1);
H1 = Ref(H, -1); L1 = Ref(L, -1);
C1 = Ref(C, -1);     [B][COLOR="Red"]up = C1 > O1;[/COLOR][/B]
TimeframeRestore(); 
         
   VarSet( "M"+ i, TimeFrameExpand( up, i*in1Minute , expandPoint ) ); 
} 

for( i = 1; i < 5; i++ ) 
{                    
  m = VarGet( "M" + i );  [COLOR="DarkRed"]([COLOR="DarkSlateBlue"][COLOR="Red"]Since,we are only talking about numbers not specific number, so i didn't use  i ==2 here[/COLOR][/COLOR] )[/COLOR]
   { 
      for( b = 0; b < BarCount; b++ ) {
       if( M[b] )   PlotText(" "+(i), b, L[b]-1-(i), colorAqua);
}}}
 
Last edited:
BELIEVE , IT DOESN'T WORK RIGHT , IT MOVE WITH NEXT CANDLES UNTIL IT FIX ITSELF, IN SIMPLE NO USE OF IT .

HOW TO BELIEVE IT ? IT MOVES WITH PRICE.

STEP 1:
Use below code:
Code:
SetBarsRequired( -2, -2 ); 
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();
for( i = 1; i < 5; i++ ) 
{ 

    TimeframeSet( i*in1Minute ); 
     O1 = Ref(O, -1);
H1 = Ref(H, -1); L1 = Ref(L, -1);
C1 = Ref(C, -1);     [B][COLOR="Red"]up = C1 > O1;[/COLOR][/B]
TimeframeRestore(); 
         
   VarSet( "M"+ i, TimeFrameExpand( up, i*in1Minute , expandPoint ) ); 
} 

for( i = 1; i < 5; i++ ) 
{                    
  m = VarGet( "M" + i );  [COLOR="DarkRed"]([COLOR="DarkSlateBlue"][COLOR="Red"]Since,we are only talking about numbers not specific number, so i didn't used  i ==2 here[/COLOR][/COLOR] )[/COLOR]
   { 
      for( b = 0; b < BarCount; b++ ) {
       if( M[b] )   PlotText(" "+(i), b, L[b]-1-(i), colorAqua);
}}}

STEP 2: Either see it in real time or Use Bar replay ..
Use your bar replay, you'll see it by yourself , numbers are moving to next candles , kindly see 3,4,5 numbers .


STEP 3:
http://imgur.com/6bMmpm8
In this, 4 number is moving with price. same number move for 3-4 candles before it fix it.
need more?
http://imgur.com/dAQcavt

http://imgur.com/oijXyXr
Need more?
let me know, i can show you more and more, simply bigger the number, more it moves before it fix itself.
 
Last edited:

Similar threads