How to code? - page 140

 

GBP/JPY indicator..... need programmer

I need a indicator for a trend I have found in the GBP/JPY pair. Watching a 30 minute candle stick chart, if the last candle closed up/green and the current candle moves down/red below the Low of the green candle, then it will continue to move down for a minimum of 10 pips or more (usually more), either on that candle or the next. This is also true the other way, if the previous candle closed down/red and the current candle moves up/green above the High of the red candle it will continue the same as before.

You can go back and look on the 30 minute chart to confirm this. So if anyone is interested in making this indicator, please let me know. Oh and I would like the indicator to be a Arrow showing the up or down movement.

Thanks!

 

Mechanical trading EA question

how would I code an EA to look at last bar's price move up or down and if this move is >= (external variable I can set) then on present bar open a same direction trade with external values for Stop loss, Trailing Stop and Take profit and make this the Only trade to be opened on the present bar...

So check to see if trading if so then no more trading till next bar even if profit or stop loss reached...

 

we need and should open thread like CopyRight and copyLeft

Linuxser:
Ok ok,

member has an infraction due the overdose of reports.

But we need to be pragmatic and not for the only decompiling action you're violating copyrights.

First, yes or yes, the code needs to have a patent from any patent office in the world.

Just after the code (product, logarithm, dna sequence, thing, idea, whatever) has the patent is protected for any copyright law around to world because no matter country almost all have signed the international copyrights agreements. If no patent, so sorry.

You can't claim you have copyrights over something if you're not the patent owner. That's the way the thing (and the world) works.

eg: You write a book. Do you have ISBN for that book? yes or no?. No, sorry the book writer could be anybody.

Btw, why coders that claim to be so good keeps posting ex4 files while decompilation is so easy?

If I was so good as some of them claims I would write my indicators using another tools with at least AES encryption.

A friend who is a really good coder is teaching me about how to do that. Is not hard and it works. Have you tried to decompile a Windows library?
cockeyedcowboy:
Linuxser

I beleive you are unclear in your above post. CopyRight and Patents are two different things. a book or any writen document has an author and the the author has a right to his writtings. A patent is on a design, operation, etc.. and that needs to be registered to be good. Copyrights on the other hand has no such requirement if the author has no intention to make public. If I were to mail you a letter, the copy of the letter is yours but the witings of the letter is still belongs to me. If you publish that letter I can have recourse against you as I did not intend to publish it. Any of my writings are considered part of my private library and are protected by copyright laws.

Dont know what your trying to say in the above post, but if the code, as this one in question, is clearly been decompiled it should be considered illegally gotten. As for posting any of my writings I consider it in line with posting my bank account numbers or even the name of any company I have accounts with. I will not do it, the only time I transfer code is in private. I have ask why you dont have a means of private rooms in this forum it was for this very issue, I am not so much concern with someone decompiling some thing for their own private and personal use, although still illegal, my main objection is the ones that do it to later profit from it by selling it to others as their work.

I was going to post my time library a while back but have not done so why? Plan and simple; The library was to good to give others, and have them sell it as their work. I am good and theres others that are better programers along with many more that have stoped posting over the years because for this very issue.

Keit
Linuxser:

Hi buddy. I'm just talking about the legal view. If somebody pretends to have the copyrights or patent about something is for some reason like money, public recognition, premiums, the only desire to be considered the author, so on.

If author does not have any petition about why wants to have the rights about such thing there is no sense in claim copyrights.

Legally, copyrights or patents have almost same approach, you need to have proof that you're the author. And the only way to do that is to register or to gather enough material to pretend being the original author. In both cases that proofs needs to be shown on a court to get a sentence that allows you the manger of the rights.

Without a court sentence there wouldn't have been a punitive action coming from the state which have the monopoly of public force and it's the only allow to shall justice. And justice is what the author that feels his rights has been damaged is looking for.

In that way copyleft is born. It's the opposite.

As you write: as this one in question, is clearly been decompiled it should be considered illegally gotten.

And you're fully right. Original author needs to have the proof to probe that a crime has been committed. Proofs are basis of modern legal systems and the state of rights.

Otherwise we could sentence a man for murder just because somebody claims he's a murder.

Also: If I were to mail you a letter, the copy of the letter is yours but the writings of the letter is still belongs to me.

That's depends on the contract between you and the mail provider and I and the email prvider.

If that letter was sent by hotmail the rights belongs to Microsoft

PD:

I'm very happy to have this talk besides forex, indicators, codes.

 

Error 138 - how to overcome requote

Hello guys

I have my EA coded with RefreshRates as per following, but I still have requote and my EA stop sending new CloseOrder after 1 or 2 try. How to I write a code that will ask my EA to keep sending CloseOrder until it accepted by the broker server? Thanks

for (int i=0; i < RepeatN; i++)

{

RefreshRates();

bool res = CloseOrder(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID));

if (res) break;

}

 

Anyone can help me do the coding?

 
forexarchitect:
Hello guys

I have my EA coded with RefreshRates as per following, but I still have requote and my EA stop sending new CloseOrder after 1 or 2 try. How to I write a code that will ask my EA to keep sending CloseOrder until it accepted by the broker server? Thanks

for (int i=0; i < RepeatN; i++)

{

RefreshRates();

bool res = CloseOrder(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID));

if (res) break;

}

Use a while loop.

Ex:

int CA()//Close All

{

while(OrdersTotal()>0)

{

OrderSelect(0,SELECT_BY_POS);

if(OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),999,Red);

if(OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),999,Orange);

if(OrderType()==OP_BUYSTOP||OrderType()==OP_SELLSTOP||OrderType()==OP_BUYLIMIT||OrderType()==OP_SELLLIMIT) OrderDelete(OrderTicket());

}

return(0);

}

[/PHP]

This will Close ALL orders when you call the function.

Place this code after the return(0) at the bottom of your EA, or in an include file. Then all you have to do is type:

[PHP]CA();

Type this anywhere in your EA you want ALL orders to close.

Hope this helps.

 

To Wolfe

That's Nice!

Big Be

 

Thanks Wolfe, appreciate.. I will try this

 

A much easier way is to use the include file OrderReliable.

Put it in your experts/include folder then add the following to the top of your EA...

#include

Lux

Files:
 

How do you stop an EA from opening new trades if your terminal is restarted and you have already made your days profit.

Cheers

Beno

Reason: