Newbie need help on simple things

 

Hi,


I'm trying to code my own EA but I'm very new to this.

These are few things that I want to do:

1. Calculate profit based on closed orders - better if it can be per trading session (from opening terminal until closing it)

2. Calculate number of lots per trading session

3. Turn off the EA automatically when limit reached (for example profit/loss limit, etc)


I assume that these are a very basic codes, but somehow I couldn't find them myself. :(


Thanks before.