Forum

How to store last ADX cross signal in a variable in EA in MT4

Hi I am using ADX cross EA. At the moment it buys and sells only when +DI and -DI crosses. Could someone please help as below If No trades exist then place trade based on LAST +Di and -DI cross. I have tried to store the last cross signal value in "static double" under void OnTick(void), BUT ITS

function to return "LAST CLOSED LOSS TRADE's Volume (Lot size) "

Hi I am building an EA. Please someone help to select or write a function to return "LAST CLOSED ORDER's Volume (Lot size) " using EA's Magic number and currency pair. It would be much better if someone can show me to get "lot Size" of the "closed LOSS TRADE" only ( dont need Profitable trade's lot