Forum

Assigning Ticket number to Array

Hi Folks I am writing a program to keep a record of the Order Ticket numbers in an array. There is an issue that I cant seem to resolve. The code is attached. When I print out the orderticket directly from the the OrderTicket() function or from the order_ticket variable, it is correct. However, when

TP value works for EURUSD but not AUDUSD... Why...

Hi Everyone In my EA, whenever i open an order, i will open 2 one after the other. For the second order, i will put in a TP value (fixed at 10 pips). res= OrderSend ( Symbol (), OP_SELL ,LotsOptimized(), Bid , 3 , 0 , 0 , "" ,MAGICMA, 0 ,Blue); res= OrderSend ( Symbol (), OP_SELL

Help with EA to do logging

Hi Guys I wrote an EA to just do logging of signals into a .csv file for the 1M timeframe. I tried running it by attaching the EA to a live chart, but the code doesn't seem to update the .csv file. My "my_data.csv" file is located in <C:\MetaTrader - Alpari UK\tester\files> I would really appreciate

Cant set StopLoss using OrderModify(), only TakeProfit is working

Hi I have been coding my own EA for the first time and so far all seems good. :) To open a trade I used the OrderSend() command and it works as accepted. When i tried to add in the SL and TP levels in the OrderSend() command, no order was being opened. When i set both of them to 0, then it is fine