nidalzd / Publications
Forum
is there a limit of how much resources can an EA use?
Im creating an expert advisor that calculates stats of each magic number in Orderhistory() and printing them , the EA is working well on a small account with less that 30 magic numbers in order history . however i tried this EA on an account with more than 100 magic numbers in OrderHistory() and a
My code is outputting(printing) results not as expected.
Hello , i built this code trying to check the results of the EA's in my account based on their magic numbers. i loop through the trades from the oldest to the newest for each magic number and perform calculations in order to calculate values e0 , e1 ,e2 . i will share the code and then explain the
Previous trade lot size.
I'm trying to double the previous trade lotsize if the last trade was negative in the following code : double last_lot; double lotSize = AccountBalance() * percentage / (StopLossPips * MarketInfo( Symbol (), MODE_TICKVALUE)); int total_orders = OrdersHistoryTotal(); int loss_trades_count = 0 ; for (
Can i change certain EA lotsize with another Script/EA?
I have an Expert advisor that is performing trades on my account , but i don't have access to its code . I want to change its lot size to make it dynamic , can i add another EA that can control the lot size of another EA? if not , is there any other way possible that i can do this
Profit Factor calculations
hello guys , hope you are doing well. i wrote a code that i'm currently using to calculate profit factor for a specific magic number : double Grosswin(){ int win=OrderProfit(); double grosswin= 0 ; int i= 0 ; if (cnt> 0 ) for ( i ;i<cnt ; i++) if ( OrderSelect (i, SELECT_BY_POS, MODE_HISTORY)) if
retrieve all the magic numbers in Ordershistory
int totalOrders = OrdersTotal (); int magicNumbers[]; ArrayResize (magicNumbers, totalOrders); int magicNumberCount = 0 ; for ( int i = 0 ; i < totalOrders; i++) { OrderSelect (i, SELECT_BY_POS, MODE_TRADES); int currentMagicNumber = OrderMagicNumber();
Protecting EA from unauthorized use
I developed and EA and wanted to protect it from unauthorized use , so i used time limit from an article mentioned here. #property copyright "Copyright © 2009, etc" #property link " http://etc.com.ua " int start() { datetime LastAllowedDate = D'2009.09.11 23:59:00' ; if ( TimeCurrent () >=
custom HTML report file
Is there any way to create a custom HTML document that reports the account history and custom function , or just random indicator output
Chart text Fontcolor change in MQL4
hello guys i created a function to print on chart specific text , but the color is default even if i set it differently. void Info( string NAME , double CORNER , int Y , int X , string TEXT , int FONTSIZE , string Font , color FONTCOLOR ){ ObjectCreate (NAME, OBJ_LABEL , 0 , 0 , 0 );
Orders Report EA
hello guys hope you're doing good , i'm new to mql4 , i'm trying to do a simple expert expert advisor that counts the number of trades each expert advisor did historically using the matching number, int OnInit () { return ( INIT_SUCCEEDED ); } void OnTick () { int i; int exe; for